From c1410cb045169c47c59459673219f2e7d878c22c Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Mon, 27 Jun 2016 17:44:57 +0200 Subject: [PATCH] openssl: Whitelist OPENSSL_init_crypto() and others in leak detective Lots of static data is allocated in this function, which isn't freed until the library is unloaded (we can't call OPENSSL_cleanup() as initialization would fail when calling it again later). When enabling the leak detective the test runner eventually crashes as all the data allocated during initialization has an invalid size when freed after leak detective has been unloaded. --- src/libstrongswan/utils/leak_detective.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libstrongswan/utils/leak_detective.c b/src/libstrongswan/utils/leak_detective.c index a0bdae715..aeadc0cb3 100644 --- a/src/libstrongswan/utils/leak_detective.c +++ b/src/libstrongswan/utils/leak_detective.c @@ -564,6 +564,10 @@ char *whitelist[] = { "ECDSA_do_sign_ex", "ECDSA_verify", "RSA_new_method", + /* OpenSSL 1.1.0 does not cleanup anymore until the library is unloaded */ + "OPENSSL_init_crypto", + "CRYPTO_THREAD_lock_new", + "ERR_add_error_data", /* OpenSSL libssl */ "SSL_COMP_get_compression_methods", /* NSPR */