From 9a7ccb9bf3e08103a65ada71e66548e0d23bb125 Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Fri, 30 Mar 2018 11:29:40 +1100 Subject: [PATCH] Don't call SSL_COMP_free_compression_methods if SSL_OP_NO_COMPRESSION is defined. --- asio/include/asio/ssl/detail/impl/openssl_init.ipp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/asio/include/asio/ssl/detail/impl/openssl_init.ipp b/asio/include/asio/ssl/detail/impl/openssl_init.ipp index 7944687d..fb0fff94 100644 --- a/asio/include/asio/ssl/detail/impl/openssl_init.ipp +++ b/asio/include/asio/ssl/detail/impl/openssl_init.ipp @@ -79,10 +79,12 @@ public: ::ERR_remove_thread_state(NULL); #endif // (OPENSSL_VERSION_NUMBER < 0x10000000L) #if (OPENSSL_VERSION_NUMBER >= 0x10002000L) \ - && (OPENSSL_VERSION_NUMBER < 0x10100000L) + && (OPENSSL_VERSION_NUMBER < 0x10100000L) \ + && !defined(SSL_OP_NO_COMPRESSION) ::SSL_COMP_free_compression_methods(); #endif // (OPENSSL_VERSION_NUMBER >= 0x10002000L) // && (OPENSSL_VERSION_NUMBER < 0x10100000L) + // && !defined(SSL_OP_NO_COMPRESSION) #if !defined(OPENSSL_IS_BORINGSSL) ::CONF_modules_unload(1); #endif // !defined(OPENSSL_IS_BORINGSSL)