From 939bb7f6e9060bdb39d08e56b605d054a6de7658 Mon Sep 17 00:00:00 2001 From: Peter Pentchev Date: Sun, 2 Oct 2016 02:21:20 +0300 Subject: [PATCH] Remove the cleanup functions with OpenSSL 1.1. The thread support in OpenSSL has been rewritten almost completely and the cleanup functions are now executed automatically. --- lib/ssl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ssl.c b/lib/ssl.c index 6a5f5d9e..9cf07e43 100644 --- a/lib/ssl.c +++ b/lib/ssl.c @@ -194,6 +194,7 @@ lws_ssl_destroy(struct lws_vhost *vhost) if (!vhost->user_supplied_ssl_ctx && vhost->ssl_client_ctx) SSL_CTX_free(vhost->ssl_client_ctx); +#if (OPENSSL_VERSION_NUMBER < 0x10100006L) #if (OPENSSL_VERSION_NUMBER < 0x01000000) || defined(USE_WOLFSSL) ERR_remove_state(0); #else @@ -210,6 +211,7 @@ lws_ssl_destroy(struct lws_vhost *vhost) CRYPTO_cleanup_all_ex_data(); #endif #endif +#endif } LWS_VISIBLE void @@ -690,6 +692,7 @@ lws_ssl_context_destroy(struct lws_context *context) #else #if defined(LWS_USE_MBEDTLS) #else +#if (OPENSSL_VERSION_NUMBER < 0x10100006L) #if (OPENSSL_VERSION_NUMBER < 0x01000000) || defined(USE_WOLFSSL) ERR_remove_state(0); #else @@ -706,4 +709,5 @@ lws_ssl_context_destroy(struct lws_context *context) CRYPTO_cleanup_all_ex_data(); #endif #endif +#endif }