Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 517330 Details for
Bug 624412
=net-libs/libesmtp-1.0.6-r2 fails to build with >=openssl-1.1.0
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
libesmtp-1.0.6-openssl-1.1-api-compatibility.patch
libesmtp-1.0.6-openssl-1.1-api-compatibility.patch (text/plain), 2.19 KB, created by
Quentin Minster
on 2018-02-01 01:18:07 UTC
(
hide
)
Description:
libesmtp-1.0.6-openssl-1.1-api-compatibility.patch
Filename:
MIME Type:
Creator:
Quentin Minster
Created:
2018-02-01 01:18:07 UTC
Size:
2.19 KB
patch
obsolete
>diff --git a/configure.ac b/configure.ac >index 556f220..2c0693d 100644 >--- a/configure.ac >+++ b/configure.ac >@@ -303,7 +303,7 @@ if test x$with_openssl != xno ; then > ) > fi > if test x$with_openssl != xno ; then >- AC_CHECK_LIB(ssl, SSL_library_init, [ >+ AC_CHECK_LIB(ssl, SSL_new, [ > with_openssl=yes > LIBS="-lssl -lcrypto $LIBS" > ], [ >diff --git a/smtp-tls.c b/smtp-tls.c >index 9a66806..cfc6589 100644 >--- a/smtp-tls.c >+++ b/smtp-tls.c >@@ -57,6 +57,7 @@ static void *ctx_password_cb_arg; > #ifdef USE_PTHREADS > #include <pthread.h> > static pthread_mutex_t starttls_mutex = PTHREAD_MUTEX_INITIALIZER; >+#if OPENSSL_VERSION_NUMBER < 0x10100000 > static pthread_mutex_t *openssl_mutex; > > static void >@@ -70,6 +71,7 @@ openssl_mutexcb (int mode, int n, > pthread_mutex_unlock (&openssl_mutex[n]); > } > #endif >+#endif > > static int > starttls_init (void) >@@ -77,6 +79,10 @@ starttls_init (void) > if (tls_init) > return 1; > >+#if OPENSSL_VERSION_NUMBER < 0x10100000 >+ /* starting from OpenSSL 1.1.0, OpenSSL uses a new threading API and does its own locking */ >+ /* also initialization has been reworked and is done automatically */ >+ /* so there's not much to do here any more */ > #ifdef USE_PTHREADS > /* Set up mutexes for the OpenSSL library */ > if (openssl_mutex == NULL) >@@ -94,9 +100,10 @@ starttls_init (void) > CRYPTO_set_locking_callback (openssl_mutexcb); > } > #endif >- tls_init = 1; > SSL_load_error_strings (); > SSL_library_init (); >+#endif >+ tls_init = 1; > return 1; > } > >@@ -201,7 +208,15 @@ starttls_create_ctx (smtp_session_t session) > 3207. Servers typically support SSL as well as TLS because some > versions of Netscape do not support TLS. I am assuming that all > currently deployed servers correctly support TLS. */ >+#if OPENSSL_VERSION_NUMBER < 0x10100000 > ctx = SSL_CTX_new (TLSv1_client_method ()); >+#else >+ ctx = SSL_CTX_new (TLS_client_method ()); >+ if (!SSL_CTX_set_min_proto_version(ctx, TLS1_VERSION)) { >+ /* FIXME: set an error code AND free the allocated ctx */ >+ return NULL; >+ } >+#endif > > /* Load our keys and certificates. To avoid messing with configuration > variables etc, use fixed paths for the certificate store. These are
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 624412
:
482868
| 517330