From 2cde22623ca0fd9571d8d57c5a8965082d815e1c Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Tue, 13 Sep 2016 21:59:03 +1000 Subject: [PATCH] Call SSL_COMP_free_compression_methods() on ssl cleanup. This call is needed for OpenSSL >=1.0.2 and <1.1.0. --- asio/include/asio/ssl/detail/impl/openssl_init.ipp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/asio/include/asio/ssl/detail/impl/openssl_init.ipp b/asio/include/asio/ssl/detail/impl/openssl_init.ipp index 4cc9859c..392eff9b 100644 --- a/asio/include/asio/ssl/detail/impl/openssl_init.ipp +++ b/asio/include/asio/ssl/detail/impl/openssl_init.ipp @@ -78,6 +78,11 @@ public: #elif (OPENSSL_VERSION_NUMBER < 0x10100000L) ::ERR_remove_thread_state(NULL); #endif // (OPENSSL_VERSION_NUMBER < 0x10000000L) +#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) \ + && (OPENSSL_VERSION_NUMBER < 0x10100000L) + ::SSL_COMP_free_compression_methods(); +#endif // (OPENSSL_VERSION_NUMBER >= 0x10002000L) + // && (OPENSSL_VERSION_NUMBER < 0x10100000L) #if !defined(OPENSSL_IS_BORINGSSL) ::CONF_modules_unload(1); #endif // !defined(OPENSSL_IS_BORINGSSL)