diff --git src/lib/crypto/OSSLCryptoFactory.cpp src/lib/crypto/OSSLCryptoFactory.cpp index ace4bcb..b5456d4 100644 --- src/lib/crypto/OSSLCryptoFactory.cpp +++ src/lib/crypto/OSSLCryptoFactory.cpp @@ -175,6 +175,7 @@ OSSLCryptoFactory::OSSLCryptoFactory() OPENSSL_INIT_LOAD_CRYPTO_STRINGS | OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS | + OPENSSL_INIT_NO_ATEXIT | OPENSSL_INIT_LOAD_CONFIG, NULL); #endif @@ -238,7 +239,7 @@ OSSLCryptoFactory::~OSSLCryptoFactory() // Detect that situation because reinitialisation will fail // after OPENSSL_cleanup() has run. (void)ERR_set_mark(); - ossl_shutdown = !OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_RDRAND, NULL); + ossl_shutdown = !OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_RDRAND | OPENSSL_INIT_NO_ATEXIT, NULL); (void)ERR_pop_to_mark(); #endif if (!ossl_shutdown)