From 96776c4b428366605636426309dc3ca7779cb005 Mon Sep 17 00:00:00 2001 From: musicwood <413431835@qq.com> Date: Mon, 21 Dec 2020 11:24:32 +0800 Subject: [PATCH] update src/Util/SSLBox.cpp. --- src/Util/SSLBox.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Util/SSLBox.cpp b/src/Util/SSLBox.cpp index 1f03d83..dc886fc 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(); -- Gitee