Don't call ENGINE_cleanup when configured "no-engine"
authorRichard Levitte <levitte@openssl.org>
Wed, 9 Mar 2016 11:52:50 +0000 (12:52 +0100)
committerRichard Levitte <levitte@openssl.org>
Wed, 9 Mar 2016 11:52:50 +0000 (12:52 +0100)
Reviewed-by: Matt Caswell <matt@openssl.org>
crypto/init.c

index c19afd09e283cac1589000ddae29eddefaef2555..1cac74193fc431eb822010a3c85457a4277c3a5d 100644 (file)
@@ -455,8 +455,10 @@ void OPENSSL_cleanup(void)
     CRYPTO_THREAD_cleanup_local(&threadstopkey);
 
 #ifdef OPENSSL_INIT_DEBUG
+#ifndef OPENSSL_NO_ENGINE
     fprintf(stderr, "OPENSSL_INIT: OPENSSL_cleanup: "
                     "ENGINE_cleanup()\n");
+#endif
     fprintf(stderr, "OPENSSL_INIT: OPENSSL_INIT_library_stop: "
                     "CRYPTO_cleanup_all_ex_data()\n");
     fprintf(stderr, "OPENSSL_INIT: OPENSSL_INIT_library_stop: "
@@ -467,7 +469,9 @@ void OPENSSL_cleanup(void)
                     "RAND_cleanup()\n");
 
 #endif
+#ifndef OPENSSL_NO_ENGINE
     ENGINE_cleanup();
+#endif
     CRYPTO_cleanup_all_ex_data();
     EVP_cleanup();
     CONF_modules_free();