summaryrefslogtreecommitdiff
path: root/net-misc/stunnel
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-03-03 13:42:34 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-03-03 13:42:34 +0000
commit066d27181e9a797ad9f8fc43b49fc9a10ff2f707 (patch)
tree3cb05783d73b2c33589ba305144a31c718e123cd /net-misc/stunnel
parent16449a80e28af2209916cc66d19c9a44ca2b90d9 (diff)
gentoo resync : 03.03.2019
Diffstat (limited to 'net-misc/stunnel')
-rw-r--r--net-misc/stunnel/Manifest3
-rw-r--r--net-misc/stunnel/files/stunnel-5.50-libressl.patch228
-rw-r--r--net-misc/stunnel/stunnel-5.50-r1.ebuild (renamed from net-misc/stunnel/stunnel-5.50.ebuild)6
3 files changed, 233 insertions, 4 deletions
diff --git a/net-misc/stunnel/Manifest b/net-misc/stunnel/Manifest
index 5259228db813..d228d3976a2c 100644
--- a/net-misc/stunnel/Manifest
+++ b/net-misc/stunnel/Manifest
@@ -2,6 +2,7 @@ AUX stunnel 1259 BLAKE2B f407bcff9249e57c46f641e8b666c187f3279e14d7d28f356506388
AUX stunnel-5.39-compat-libressl.patch 5329 BLAKE2B b88f615e88940dc091c264b34ef3c71701e120cc907bd438cb6966b1b720fd9dd8b8bcab5235519b0eefaa1576e37cc8b4c9887cf4d6a2330ba5461347f6ded7 SHA512 a6390e1452f0cf7f2867b28ebc36e0b4f9f6ab8985b03f182625d1970a9bbc0228addaa966feb3c0df8925191b73fdaf48e1e65aef68d3d62962fd28760b3578
AUX stunnel-5.43-compat-libressl.patch 5328 BLAKE2B 5a014b47e3a314ab2d016ca31fb98d8a4fd613816c38382ece2a9925be217151130fab7d14666aac2602513c1cb0af04742c6a80eb9b8bf51caa46fdc05ad4b1 SHA512 d45e660fc610636dc93b8f696fc378cda4fcf7989f22aecff6394f84bbddfabb70255ebc4a9291a29806b3631767bb64b826c4a9fb2ecfe0ab7e53aebcdc7eb3
AUX stunnel-5.48-compat-libressl.patch 4845 BLAKE2B 0c6bc9059902be43970a78269632dcdbb82a9e07a6cfa8dca6b960f79832953a7d7173097c74a24ccad8c59deca1353887519cfde107b22d10422204bb83e9cf SHA512 b03277b8487fc9cd763c11e0b32c3755dd4aea76ecc21238204d4f27f03b5cfc72ee7ab148aa813a6eb21bb588d8dadc2b0610049175fa1278e799681a946098
+AUX stunnel-5.50-libressl.patch 8684 BLAKE2B 6c4b01ec93ba8e8d734dc5489b9eddabb3e655a858c709ed75cea7a38b745d3a281d483ea74d47ae98d3371321fbc9d2776cd470e56eaea0ab6851ec3b203f28 SHA512 802c5ae1c729cdeb72f1d4f53d8216243f5e3e801f964b057a53099ebe9cc67b1e8d09d58475130d5239c9cb5fd8a967a10193d1740daed182b7af43122b19d4
AUX stunnel-compat-libressl.patch 1871 BLAKE2B e7545ae95b173b868fff7159a681497655f8c80c994add9901a752787d2c51728c994ef940f540abc7538585b51ca4de41ddd20e0f929330188ffd2e0d2ded78 SHA512 590f6be1962ef3ca1c8f1c64c02b1e63b7211a2ba5cb5fd4eb09127e45ee5251a7ec701aae3eda25e34caa1977378ad5f7b75e826aee7d9d5ff8b9acbd298f36
AUX stunnel-r1 1437 BLAKE2B 92689cd4ee63920e1064cb96c88795132ee917e7886f9970f125f52d4eabf0fdb2515783c321771ae4e06598dca7e54f9b8131523c14dea7efa2769e0de0ed4b SHA512 6ccb1735770a4662e6fcb02bb7d0329cbed9aec16fc410f9d0f34f1a13dc5c9767eceafa406c55cca23b364c87c033bf5349d267838bbd5c560aaeec17ccd92c
AUX stunnel.conf 1419 BLAKE2B 868f91060c0e43ded7eb6ae0c3734eaa1670caabb3b649cc552699a219a98b58374aa8864ef0d79d31e39185c8f3c35b3584f2c09218fff965966554e5335370 SHA512 4f76fd92eaf7fe878f7566a29ded673e7054edb8d7efeca8aad8621fdddeed457676d73b896d24466843874bb1b82ad3102cb1de4d24a7ac3597f3bf85d36826
@@ -23,5 +24,5 @@ EBUILD stunnel-5.45.ebuild 2919 BLAKE2B 681bc10896db6846af224e3c96af98bad2889040
EBUILD stunnel-5.46.ebuild 2919 BLAKE2B 681bc10896db6846af224e3c96af98bad2889040594f02cee8ec80ebf92f77905c26c3412832abb465112fddf16a39c7e763eecf6054a99f3f83e18066ecdce8 SHA512 bebf0ff0498dc819dd95d603d514720b89ee757f9f0ca39b393862f0a3fbb91e6dde173e079178fa7e18bfd1a5bb6b33bce374dbe70fe49a0e1d07707123f497
EBUILD stunnel-5.48.ebuild 2919 BLAKE2B 4196e977ad27c0c45ca0debcaba4f4bf375ed06a5e539b99521f147f63f6b2a2416bff031ece65101a1f05b9aa1f2e5b4e7381db7895806575ec9d32964b3047 SHA512 6757bea11de403ac525cf4d70f5746e5f20f1b1b04a537fb33f694d3cfc9a49ba4d92250dce0927424eb1edc0297ea27d72faae57a2f098c88a21d044a7524ca
EBUILD stunnel-5.49.ebuild 2919 BLAKE2B 4196e977ad27c0c45ca0debcaba4f4bf375ed06a5e539b99521f147f63f6b2a2416bff031ece65101a1f05b9aa1f2e5b4e7381db7895806575ec9d32964b3047 SHA512 6757bea11de403ac525cf4d70f5746e5f20f1b1b04a537fb33f694d3cfc9a49ba4d92250dce0927424eb1edc0297ea27d72faae57a2f098c88a21d044a7524ca
-EBUILD stunnel-5.50.ebuild 2916 BLAKE2B 1b32f04a2d31b068752c6ac6bb311fb1e7550a8ddea9a2eba49c6c7fc7babc57308cd457d74fb54fab9edbb95891e0c0de008ce50df41a37e369e08132a287cc SHA512 4d029fae73b4dafc12a675c73512586127575a7b4d5804ae2de31ae3256356dd2c3289a825c660a03fe21aa7078935421949cbda80351e1fd7439f1aa5b05581
+EBUILD stunnel-5.50-r1.ebuild 2898 BLAKE2B 3a71c72d4f1f2392c414842b0acda4a18e2ad703623ab4fa050110680546c945c374051c62a431ef13720fa1ff60247f19a4bddf626e291a1c1843ba4d2fcd6a SHA512 2f5ccbd150a87ee5bddca913e55d966e18b1dc02ef70907cf73e598bc8ab279c8e713c37b8f07f50c4014bdbbfb0421dd5da1fc83d326459a889a9a9541db954
MISC metadata.xml 712 BLAKE2B 2e112f8a1f4fb41bd678a7e845e109923f00c281b5673e87cf2c06e68e8c1ee79e6230150cf911f4c28085ab22dc76eff54c80d201ef2709d5ee58a70f1a0084 SHA512 03c867389e13ef2596e97bc64b47209fe445eb5f4b2012d78f426f5eec96ad8359a735d9fe981109502d297837fa6ad50c43e0fe0b618aa9aed3f30fbd01e362
diff --git a/net-misc/stunnel/files/stunnel-5.50-libressl.patch b/net-misc/stunnel/files/stunnel-5.50-libressl.patch
new file mode 100644
index 000000000000..4481220c268d
--- /dev/null
+++ b/net-misc/stunnel/files/stunnel-5.50-libressl.patch
@@ -0,0 +1,228 @@
+diff --git a/src/ctx.c b/src/ctx.c
+index cd59f4e..b41be1b 100644
+--- a/src/ctx.c
++++ b/src/ctx.c
+@@ -118,7 +118,7 @@ NOEXPORT void sslerror_log(unsigned long, char *);
+
+ /**************************************** initialize section->ctx */
+
+-#if OPENSSL_VERSION_NUMBER>=0x10100000L
++#if OPENSSL_VERSION_NUMBER>=0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+ typedef long unsigned SSL_OPTIONS_TYPE;
+ #else
+ typedef long SSL_OPTIONS_TYPE;
+@@ -126,7 +126,7 @@ typedef long SSL_OPTIONS_TYPE;
+
+ int context_init(SERVICE_OPTIONS *section) { /* init TLS context */
+ /* create TLS context */
+-#if OPENSSL_VERSION_NUMBER>=0x10100000L
++#if OPENSSL_VERSION_NUMBER>=0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+ if(section->option.client)
+ section->ctx=SSL_CTX_new(TLS_client_method());
+ else /* server mode */
+@@ -437,7 +437,7 @@ NOEXPORT int ecdh_init(SERVICE_OPTIONS *section) {
+ /**************************************** initialize OpenSSL CONF */
+
+ NOEXPORT int conf_init(SERVICE_OPTIONS *section) {
+-#if OPENSSL_VERSION_NUMBER>=0x10002000L
++#if OPENSSL_VERSION_NUMBER>=0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)
+ SSL_CONF_CTX *cctx;
+ NAME_LIST *curr;
+ char *cmd, *param;
+@@ -1247,7 +1247,7 @@ NOEXPORT void info_callback(const SSL *ssl, int where, int ret) {
+
+ c=SSL_get_ex_data((SSL *)ssl, index_ssl_cli);
+ if(c) {
+-#if OPENSSL_VERSION_NUMBER>=0x10100000L
++#if OPENSSL_VERSION_NUMBER>=0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+ OSSL_HANDSHAKE_STATE state=SSL_get_state(ssl);
+ #else
+ int state=SSL_get_state((SSL *)ssl);
+diff --git a/src/options.c b/src/options.c
+index 103ea6c..756e48c 100644
+--- a/src/options.c
++++ b/src/options.c
+@@ -75,7 +75,7 @@ NOEXPORT char *sni_init(SERVICE_OPTIONS *);
+ NOEXPORT void sni_free(SERVICE_OPTIONS *);
+ #endif /* !defined(OPENSSL_NO_TLSEXT) */
+
+-#if OPENSSL_VERSION_NUMBER>=0x10100000L
++#if OPENSSL_VERSION_NUMBER>=0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+ NOEXPORT int str_to_proto_version(const char *);
+ #else /* OPENSSL_VERSION_NUMBER<0x10100000L */
+ NOEXPORT char *tls_methods_set(SERVICE_OPTIONS *, const char *);
+@@ -3048,7 +3048,7 @@ NOEXPORT char *parse_service_option(CMD cmd, SERVICE_OPTIONS **section_ptr,
+ break;
+ }
+
+-#if OPENSSL_VERSION_NUMBER>=0x10100000L
++#if OPENSSL_VERSION_NUMBER>=0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+
+ /* sslVersion */
+ switch(cmd) {
+@@ -3621,7 +3621,7 @@ NOEXPORT void sni_free(SERVICE_OPTIONS *section) {
+
+ /**************************************** modern TLS version handling */
+
+-#if OPENSSL_VERSION_NUMBER>=0x10100000L
++#if OPENSSL_VERSION_NUMBER>=0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+
+ NOEXPORT int str_to_proto_version(const char *name) {
+ if(!strcasecmp(name, "all"))
+diff --git a/src/prototypes.h b/src/prototypes.h
+index aaf50fc..01343bf 100644
+--- a/src/prototypes.h
++++ b/src/prototypes.h
+@@ -223,7 +223,7 @@ typedef struct service_options_struct {
+ #if OPENSSL_VERSION_NUMBER>=0x009080dfL
+ long unsigned ssl_options_clear;
+ #endif /* OpenSSL 0.9.8m or later */
+-#if OPENSSL_VERSION_NUMBER>=0x10100000L
++#if OPENSSL_VERSION_NUMBER>=0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+ int min_proto_version, max_proto_version;
+ #else /* OPENSSL_VERSION_NUMBER<0x10100000L */
+ SSL_METHOD *client_method, *server_method;
+@@ -663,7 +663,7 @@ int getnameinfo(const struct sockaddr *, socklen_t,
+ #define USE_OS_THREADS
+ #endif
+
+-#if OPENSSL_VERSION_NUMBER<0x10100004L
++#if OPENSSL_VERSION_NUMBER<0x10100004L || defined(LIBRESSL_VERSION_NUMBER)
+
+ #ifdef USE_OS_THREADS
+
+@@ -711,7 +711,7 @@ typedef enum {
+
+ extern CRYPTO_RWLOCK *stunnel_locks[STUNNEL_LOCKS];
+
+-#if OPENSSL_VERSION_NUMBER<0x10100004L
++#if OPENSSL_VERSION_NUMBER<0x10100004L || defined(LIBRESSL_VERSION_NUMBER)
+ /* Emulate the OpenSSL 1.1 locking API for older OpenSSL versions */
+ CRYPTO_RWLOCK *CRYPTO_THREAD_lock_new(void);
+ int CRYPTO_THREAD_read_lock(CRYPTO_RWLOCK *);
+diff --git a/src/ssl.c b/src/ssl.c
+index ad06cb5..0b45769 100644
+--- a/src/ssl.c
++++ b/src/ssl.c
+@@ -39,7 +39,7 @@
+ #include "prototypes.h"
+
+ /* global OpenSSL initialization: compression, engine, entropy */
+-#if OPENSSL_VERSION_NUMBER>=0x10100000L
++#if OPENSSL_VERSION_NUMBER>=0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+ NOEXPORT int cb_dup_addr(CRYPTO_EX_DATA *to, const CRYPTO_EX_DATA *from,
+ void *from_d, int idx, long argl, void *argp);
+ #else
+@@ -114,7 +114,7 @@ int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g) {
+ #endif
+ #endif
+
+-#if OPENSSL_VERSION_NUMBER>=0x10100000L
++#if OPENSSL_VERSION_NUMBER>=0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+ NOEXPORT int cb_dup_addr(CRYPTO_EX_DATA *to, const CRYPTO_EX_DATA *from,
+ void *from_d, int idx, long argl, void *argp) {
+ #else
+@@ -177,7 +177,7 @@ int ssl_configure(GLOBAL_OPTIONS *global) { /* configure global TLS settings */
+
+ #ifndef OPENSSL_NO_COMP
+
+-#if OPENSSL_VERSION_NUMBER<0x10100000L
++#if OPENSSL_VERSION_NUMBER<0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+
+ NOEXPORT int COMP_get_type(const COMP_METHOD *meth) {
+ return meth->type;
+diff --git a/src/sthreads.c b/src/sthreads.c
+index 412a31a..e12a330 100644
+--- a/src/sthreads.c
++++ b/src/sthreads.c
+@@ -97,14 +97,16 @@ unsigned long stunnel_thread_id(void) {
+
+ #endif /* USE_WIN32 */
+
+-#if OPENSSL_VERSION_NUMBER>=0x10000000L && OPENSSL_VERSION_NUMBER<0x10100004L
++#if (OPENSSL_VERSION_NUMBER>=0x10000000L && OPENSSL_VERSION_NUMBER<0x10100004L) || \
++ defined(LIBRESSL_VERSION_NUMBER)
+ NOEXPORT void threadid_func(CRYPTO_THREADID *tid) {
+ CRYPTO_THREADID_set_numeric(tid, stunnel_thread_id());
+ }
+ #endif
+
+ void thread_id_init(void) {
+-#if OPENSSL_VERSION_NUMBER>=0x10000000L && OPENSSL_VERSION_NUMBER<0x10100000L
++#if (OPENSSL_VERSION_NUMBER>=0x10000000L && OPENSSL_VERSION_NUMBER<0x10100000L) || \
++ defined(LIBRESSL_VERSION_NUMBER)
+ CRYPTO_THREADID_set_callback(threadid_func);
+ #endif
+ #if OPENSSL_VERSION_NUMBER<0x10000000L || !defined(OPENSSL_NO_DEPRECATED)
+@@ -115,7 +117,7 @@ void thread_id_init(void) {
+ /**************************************** locking */
+
+ /* we only need to initialize locking with OpenSSL older than 1.1.0 */
+-#if OPENSSL_VERSION_NUMBER<0x10100004L
++#if OPENSSL_VERSION_NUMBER<0x10100004L || defined(LIBRESSL_VERSION_NUMBER)
+
+ #ifdef USE_PTHREAD
+
+@@ -224,7 +226,7 @@ NOEXPORT int s_atomic_add(int *val, int amount, CRYPTO_RWLOCK *lock) {
+
+ CRYPTO_RWLOCK *stunnel_locks[STUNNEL_LOCKS];
+
+-#if OPENSSL_VERSION_NUMBER<0x10100004L
++#if OPENSSL_VERSION_NUMBER<0x10100004L || defined(LIBRESSL_VERSION_NUMBER)
+
+ #ifdef USE_OS_THREADS
+
+@@ -334,7 +336,8 @@ int CRYPTO_atomic_add(int *val, int amount, int *ret, CRYPTO_RWLOCK *lock) {
+
+ void locking_init(void) {
+ size_t i;
+-#if defined(USE_OS_THREADS) && OPENSSL_VERSION_NUMBER<0x10100004L
++#if defined(USE_OS_THREADS) && \
++ (OPENSSL_VERSION_NUMBER<0x10100004L || defined(LIBRESSL_VERSION_NUMBER))
+ size_t num;
+
+ /* initialize the OpenSSL static locking */
+diff --git a/src/tls.c b/src/tls.c
+index 9616df3..b89c61e 100644
+--- a/src/tls.c
++++ b/src/tls.c
+@@ -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 @@ void tls_init() {
+ 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 @@ TLS_DATA *tls_get() {
+
+ /**************************************** 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 */
+diff --git a/src/verify.c b/src/verify.c
+index b4b5115..0457ce0 100644
+--- a/src/verify.c
++++ b/src/verify.c
+@@ -346,7 +346,7 @@ NOEXPORT int cert_check_local(X509_STORE_CTX *callback_ctx) {
+ cert=X509_STORE_CTX_get_current_cert(callback_ctx);
+ subject=X509_get_subject_name(cert);
+
+-#if OPENSSL_VERSION_NUMBER<0x10100006L
++#if OPENSSL_VERSION_NUMBER<0x10100006L || defined(LIBRESSL_VERSION_NUMBER)
+ #define X509_STORE_CTX_get1_certs X509_STORE_get1_certs
+ #endif
+ /* modern API allows retrieving multiple matching certificates */
diff --git a/net-misc/stunnel/stunnel-5.50.ebuild b/net-misc/stunnel/stunnel-5.50-r1.ebuild
index 428e58d9d2be..c2c51a0ff501 100644
--- a/net-misc/stunnel/stunnel-5.50.ebuild
+++ b/net-misc/stunnel/stunnel-5.50-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
@@ -39,8 +39,8 @@ src_prepare() {
sed -i -e "s/^install-data-local:/do-not-run-this:/" \
tools/Makefile.in || die "sed failed"
- # libressl compat
- eapply "${FILESDIR}"/${PN}-5.48-compat-libressl.patch
+ # bug 656420
+ eapply "${FILESDIR}"/${P}-libressl.patch
echo "CONFIG_PROTECT=\"/etc/stunnel/stunnel.conf\"" > "${T}"/20stunnel