Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

GH #159: Crash in openssl CRYPTO_thread_id()

GH #159: Crash in openssl CRYPTO_thread_id() after library
libPocoCrypto.so has been unloaded.
  • Loading branch information...
commit 0a153046b4ce80f214cdad4fc00ababe4b918bdf 1 parent e7f4019
@aleks-f aleks-f authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 Crypto/src/OpenSSLInitializer.cpp
View
9 Crypto/src/OpenSSLInitializer.cpp
@@ -92,7 +92,9 @@ void OpenSSLInitializer::initialize()
int nMutexes = CRYPTO_num_locks();
_mutexes = new Poco::FastMutex[nMutexes];
CRYPTO_set_locking_callback(&OpenSSLInitializer::lock);
-#ifndef POCO_OS_FAMILY_WINDOWS // SF# 1828231: random unhandled exceptions when linking with ssl
+// not needed on windows
+// (see SF# 1828231: random unhandled exceptions when linking with ssl)
+#ifndef POCO_OS_FAMILY_WINDOWS
CRYPTO_set_id_callback(&OpenSSLInitializer::id);
#endif
CRYPTO_set_dynlock_create_callback(&OpenSSLInitializer::dynlockCreate);
@@ -111,6 +113,11 @@ 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
delete [] _mutexes;
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.