You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

87 lines
2.6 KiB

diff --git a/src/nopoll.c b/src/nopoll.c
index d4b50f3..3603f41 100644
--- a/src/nopoll.c
+++ b/src/nopoll.c
@@ -868,9 +868,11 @@ void nopoll_cleanup_library (void)
{
if (__nopoll_tls_was_init) {
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
EVP_cleanup ();
CRYPTO_cleanup_all_ex_data ();
ERR_free_strings ();
+#endif
/* notify the library isn't initialized */
__nopoll_tls_was_init = nopoll_false;
diff --git a/src/nopoll_conn.c b/src/nopoll_conn.c
index 0b85382..1770723 100644
--- a/src/nopoll_conn.c
+++ b/src/nopoll_conn.c
@@ -1380,7 +1380,9 @@ noPollConn * nopoll_conn_tls_new (noPollCtx * ctx,
/* init ssl ciphers and engines */
if (! __nopoll_tls_was_init) {
__nopoll_tls_was_init = nopoll_true;
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
SSL_library_init ();
+#endif
} /* end if */
/* call common implementation */
@@ -1426,7 +1428,9 @@ noPollConn * nopoll_conn_tls_new6 (noPollCtx * ctx,
/* init ssl ciphers and engines */
if (! __nopoll_tls_was_init) {
__nopoll_tls_was_init = nopoll_true;
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
SSL_library_init ();
+#endif
} /* end if */
/* call common implementation */
@@ -1495,7 +1499,9 @@ noPollConn * nopoll_conn_tls_new_with_socket (noPollCtx * ctx,
/* init ssl ciphers and engines */
if (! __nopoll_tls_was_init) {
__nopoll_tls_was_init = nopoll_true;
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
SSL_library_init ();
+#endif
} /* end if */
/* call common implementation */
@@ -4755,7 +4761,9 @@ nopoll_bool __nopoll_conn_accept_complete_common (noPollCtx * ctx, noPollConnOpt
/* init ssl ciphers and engines */
if (! __nopoll_tls_was_init) {
__nopoll_tls_was_init = nopoll_true;
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
SSL_library_init ();
+#endif
} /* end if */
/* now configure chainCertificate */
diff --git a/src/nopoll_decl.h b/src/nopoll_decl.h
index bfe496e..b0ce535 100644
--- a/src/nopoll_decl.h
+++ b/src/nopoll_decl.h
@@ -511,20 +511,18 @@ typedef enum {
* established with this method will only understand this
* method.
*/
- NOPOLL_METHOD_TLSV1_1 = 5
+ NOPOLL_METHOD_TLSV1_1 = 5,
#endif
#if defined(NOPOLL_HAVE_TLSv12_ENABLED)
- ,
/**
* @brief Allows to define TLSv1.2 as SSL protocol used by the
* client or server connection. A connection/listener
* established with this method will only understand this
* method.
*/
- NOPOLL_METHOD_TLSV1_2 = 6
+ NOPOLL_METHOD_TLSV1_2 = 6,
#endif
#if defined(NOPOLL_HAVE_TLS_FLEXIBLE_ENABLED)
- ,
/**
* @brief Allows to define TLS flexible negotiation where the
* highest version available will be negotiated by both