From 2eed5c615c11f4e57783b9a52c934c8b37e40c99 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Sat, 7 Jul 2007 00:13:37 +0000 Subject: [PATCH] openssl cleanup --- libtorrent/src/session_impl.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/libtorrent/src/session_impl.cpp b/libtorrent/src/session_impl.cpp index f07f48d62..085f5960b 100755 --- a/libtorrent/src/session_impl.cpp +++ b/libtorrent/src/session_impl.cpp @@ -75,6 +75,22 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/aux_/session_impl.hpp" #include "libtorrent/kademlia/dht_tracker.hpp" +#ifndef TORRENT_DISABLE_ENCRYPTION + +#include + +namespace +{ + // openssl requires this to clean up internal + // structures it allocates + struct openssl_cleanup + { + ~openssl_cleanup() { CRYPTO_cleanup_all_ex_data(); } + } openssl_global_destructor; +} + +#endif + using boost::shared_ptr; using boost::weak_ptr; using boost::bind;