From: Howard Chu Date: Sun, 18 Feb 2024 10:57:07 +0000 (+0000) Subject: ITS#9952 TLS/OpenSSL: disable use of atexit() X-Git-Tag: OPENLDAP_REL_ENG_2_5_18~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6dc030a8d528a6a2754c4b4a1fb79ec370f89229;p=thirdparty%2Fopenldap.git ITS#9952 TLS/OpenSSL: disable use of atexit() This will only have any effect if libldap is the first caller to initialize OpenSSL, but that should be all that matters when libldap is part of a dynmically loaded module. It prevents the crash in the example cases given. --- diff --git a/libraries/libldap/tls_o.c b/libraries/libldap/tls_o.c index 055d14025b..675beef7a8 100644 --- a/libraries/libldap/tls_o.c +++ b/libraries/libldap/tls_o.c @@ -223,7 +223,7 @@ tlso_init( void ) SSL_library_init(); OpenSSL_add_all_digests(); #else - OPENSSL_init_ssl(0, NULL); + OPENSSL_init_ssl(OPENSSL_INIT_NO_ATEXIT, NULL); #endif /* FIXME: mod_ssl does this */