You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
f63b8bbdb0
Fix a segmentation violation at application termination through a combination of a couple of commits cherry-picked from upstream post-2.6.1 and a contribution from mouse07410 directed at the same issue. Closes: https://trac.macports.org/ticket/64036
22 lines
875 B
Diff
22 lines
875 B
Diff
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)
|