diff --git a/src/Util/SSLBox.cpp b/src/Util/SSLBox.cpp index 1f03d83e4fe3284c523fb7f7cabd6fbf3e67a5cd..dc886fcb1c0f1d073cf74e8f91c06b4c403bd0bd 100644 --- a/src/Util/SSLBox.cpp +++ b/src/Util/SSLBox.cpp @@ -1,4 +1,4 @@ -/* +/* * Copyright (c) 2016 The ZLToolKit project authors. All Rights Reserved. * * This file is part of ZLToolKit(https://github.com/xiongziliang/ZLToolKit). @@ -105,7 +105,11 @@ SSL_Initor::~SSL_Initor() { EVP_cleanup(); ERR_free_strings(); ERR_clear_error(); +#if OPENSSL_VERSION_NUMBER >= 0x10000000L && OPENSSL_VERSION_NUMBER < 0x10100000L + ERR_remove_thread_state(NULL); +#elif OPENSSL_VERSION_NUMBER < 0x10000000L ERR_remove_state(0); +#endif CRYPTO_set_locking_callback(NULL); //sk_SSL_COMP_free(SSL_COMP_get_compression_methods()); CRYPTO_cleanup_all_ex_data();