From 43df537c4929056816ec57d742d986760273cf50 Mon Sep 17 00:00:00 2001 From: Aleksandar Fabijanic Date: Sun, 21 Apr 2013 13:42:14 -0500 Subject: [PATCH] added openssl doc quote --- Crypto/src/OpenSSLInitializer.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Crypto/src/OpenSSLInitializer.cpp b/Crypto/src/OpenSSLInitializer.cpp index 258abd9b2..ccd8c5998 100644 --- a/Crypto/src/OpenSSLInitializer.cpp +++ b/Crypto/src/OpenSSLInitializer.cpp @@ -92,9 +92,14 @@ void OpenSSLInitializer::initialize() int nMutexes = CRYPTO_num_locks(); _mutexes = new Poco::FastMutex[nMutexes]; CRYPTO_set_locking_callback(&OpenSSLInitializer::lock); -// not needed on windows -// (see SF# 1828231: random unhandled exceptions when linking with ssl) #ifndef POCO_OS_FAMILY_WINDOWS +// Not needed on Windows (see SF #110: random unhandled exceptions when linking with ssl). +// https://sourceforge.net/p/poco/bugs/110/ +// +// From http://www.openssl.org/docs/crypto/threads.html : +// "If the application does not register such a callback using CRYPTO_THREADID_set_callback(), +// then a default implementation is used - on Windows and BeOS this uses the system's +// default thread identifying APIs" CRYPTO_set_id_callback(&OpenSSLInitializer::id); #endif CRYPTO_set_dynlock_create_callback(&OpenSSLInitializer::dynlockCreate); @@ -113,8 +118,6 @@ void OpenSSLInitializer::uninitialize() EVP_cleanup(); ERR_free_strings(); CRYPTO_set_locking_callback(0); -// not needed on windows -// (see SF# 1828231: random unhandled exceptions when linking with ssl) #ifndef POCO_OS_FAMILY_WINDOWS CRYPTO_set_id_callback(0); #endif