stunnel: patch out messy function call
This commit is contained in:
parent
08e7a00323
commit
a8286734b6
2 changed files with 34 additions and 2 deletions
|
@ -0,0 +1,29 @@
|
||||||
|
--- src/tls.c 2016-12-09 06:15:59.000000000 -0500
|
||||||
|
+++ src/tls.c.new 2017-01-25 01:11:44.264271049 -0500
|
||||||
|
@@ -41,7 +41,7 @@
|
||||||
|
volatile int tls_initialized=0;
|
||||||
|
|
||||||
|
NOEXPORT void tls_platform_init();
|
||||||
|
-#if OPENSSL_VERSION_NUMBER<0x10100000L
|
||||||
|
+#if OPENSSL_VERSION_NUMBER<0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||||
|
NOEXPORT void free_function(void *);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@@ -52,7 +52,7 @@
|
||||||
|
tls_platform_init();
|
||||||
|
tls_initialized=1;
|
||||||
|
ui_tls=tls_alloc(NULL, NULL, "ui");
|
||||||
|
-#if OPENSSL_VERSION_NUMBER>=0x10100000L
|
||||||
|
+#if OPENSSL_VERSION_NUMBER>=0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
|
||||||
|
CRYPTO_set_mem_functions(str_alloc_detached_debug,
|
||||||
|
str_realloc_detached_debug, str_free_debug);
|
||||||
|
#else
|
||||||
|
@@ -184,7 +184,7 @@
|
||||||
|
|
||||||
|
/**************************************** OpenSSL allocator hook */
|
||||||
|
|
||||||
|
-#if OPENSSL_VERSION_NUMBER<0x10100000L
|
||||||
|
+#if OPENSSL_VERSION_NUMBER<0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||||
|
NOEXPORT void free_function(void *ptr) {
|
||||||
|
/* CRYPTO_set_mem_ex_functions() needs a function rather than a macro */
|
||||||
|
/* unfortunately, OpenSSL provides no file:line information here */
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'stunnel'
|
# Template file for 'stunnel'
|
||||||
pkgname=stunnel
|
pkgname=stunnel
|
||||||
version=5.39
|
version=5.39
|
||||||
revision=1
|
revision=2
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
configure_args="--enable-ipv6 --with-ssl=${XBPS_CROSS_BASE}/usr"
|
configure_args="--enable-ipv6 --with-ssl=${XBPS_CROSS_BASE}/usr"
|
||||||
hostmakedepends="perl"
|
hostmakedepends="perl"
|
||||||
|
@ -22,7 +22,7 @@ post_install() {
|
||||||
# REMARKS:
|
# REMARKS:
|
||||||
# What. A. Pain. What a total pain.
|
# What. A. Pain. What a total pain.
|
||||||
# Using the archive is the only way to get builds to keep working after the
|
# Using the archive is the only way to get builds to keep working after the
|
||||||
# new version is out. LibreSSL patches for stunnel 5.35 don't yet work. Not
|
# new version is out. LibreSSL patches for stunnel 5.35 don't yet work. Not
|
||||||
# enough is made conditional.
|
# enough is made conditional.
|
||||||
# Significant thanks to the OpenBSD project for creating patch sets for 5.37
|
# Significant thanks to the OpenBSD project for creating patch sets for 5.37
|
||||||
# One thing OpenBSD does that we don't do here is add a _stunnel user/group and
|
# One thing OpenBSD does that we don't do here is add a _stunnel user/group and
|
||||||
|
@ -31,3 +31,6 @@ post_install() {
|
||||||
# be out of line with what libressl provides.
|
# be out of line with what libressl provides.
|
||||||
# LibreSSL wants 'void (*)(void *)' but argument is of type 'void (*)(void *, const char *, int)'
|
# LibreSSL wants 'void (*)(void *)' but argument is of type 'void (*)(void *, const char *, int)'
|
||||||
# This is probably not a security problem.
|
# This is probably not a security problem.
|
||||||
|
# As of 5.39_2 it is patched to avoid the function call if using LibreSSL,
|
||||||
|
# and a different call to SSL_CTX_sess_set_get_cb gets a const unsigned char
|
||||||
|
# * instead of an unsigned char *
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue