]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9952 TLS/OpenSSL: disable use of atexit()
authorHoward Chu <hyc@openldap.org>
Sun, 18 Feb 2024 10:57:07 +0000 (10:57 +0000)
committerHoward Chu <hyc@openldap.org>
Sun, 18 Feb 2024 10:57:07 +0000 (10:57 +0000)
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.

libraries/libldap/tls_o.c

index 6847ef33b461081ab18c0b6497d456c2d00499c6..9bd830c1960dc191d4ae2efa3d263313b7100e61 100644 (file)
@@ -225,7 +225,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 */