[openssl-commits] [openssl] master update

Matt Caswell matt at openssl.org
Wed Apr 6 13:54:51 UTC 2016


The branch master has been updated
       via  7626fbf2ef70e02f47afe59b7dd7210e75371ed7 (commit)
      from  2110febb117f477cbcaf6c8fe724848b57f5d433 (commit)


- Log -----------------------------------------------------------------
commit 7626fbf2ef70e02f47afe59b7dd7210e75371ed7
Author: Matt Caswell <matt at openssl.org>
Date:   Thu Mar 17 17:06:28 2016 +0000

    Remove some OPENSSL_NO_ASYNC guards in init
    
    When config'd with "no-async" the ASYNC_NULL implementation is used, so
    async symbols still exist. We should still init the NULL implementation so
    that when we get the async ctx it is NULL rather than undefined.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 crypto/init.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/crypto/init.c b/crypto/init.c
index 404d9c0..4d28e31 100644
--- a/crypto/init.c
+++ b/crypto/init.c
@@ -220,7 +220,6 @@ static void ossl_init_no_config(void)
     config_inited = 1;
 }
 
-#ifndef OPENSSL_NO_ASYNC
 static CRYPTO_ONCE async = CRYPTO_ONCE_STATIC_INIT;
 static int async_inited = 0;
 static void ossl_init_async(void)
@@ -231,7 +230,6 @@ static void ossl_init_async(void)
     async_init();
     async_inited = 1;
 }
-#endif
 
 #ifndef OPENSSL_NO_ENGINE
 static CRYPTO_ONCE engine_openssl = CRYPTO_ONCE_STATIC_INIT;
@@ -339,7 +337,6 @@ static void ossl_init_thread_stop(struct thread_local_inits_st *locals)
     if (locals == NULL)
         return;
 
-#ifndef OPENSSL_NO_ASYNC
     if (locals->async) {
 #ifdef OPENSSL_INIT_DEBUG
         fprintf(stderr, "OPENSSL_INIT: ossl_init_thread_stop: "
@@ -347,7 +344,6 @@ static void ossl_init_thread_stop(struct thread_local_inits_st *locals)
 #endif
         ASYNC_cleanup_thread();
     }
-#endif
 
     if (locals->err_state) {
 #ifdef OPENSSL_INIT_DEBUG
@@ -437,7 +433,6 @@ void OPENSSL_cleanup(void)
     }
 #endif
 
-#ifndef OPENSSL_NO_ASYNC
     if (async_inited) {
 # ifdef OPENSSL_INIT_DEBUG
         fprintf(stderr, "OPENSSL_INIT: OPENSSL_cleanup: "
@@ -445,7 +440,6 @@ void OPENSSL_cleanup(void)
 # endif
         async_deinit();
     }
-#endif
 
     if (load_crypto_strings_inited) {
 #ifdef OPENSSL_INIT_DEBUG
@@ -565,11 +559,10 @@ int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings)
             return 0;
     }
 
-#ifndef OPENSSL_NO_ASYNC
     if ((opts & OPENSSL_INIT_ASYNC)
             && !CRYPTO_THREAD_run_once(&async, ossl_init_async))
         return 0;
-#endif
+
 #ifndef OPENSSL_NO_ENGINE
     if ((opts & OPENSSL_INIT_ENGINE_OPENSSL)
             && !CRYPTO_THREAD_run_once(&engine_openssl,


More information about the openssl-commits mailing list