[openssl-commits] [openssl] OpenSSL_1_0_2-stable update

Richard Levitte levitte at openssl.org
Thu Feb 9 23:13:37 UTC 2017


The branch OpenSSL_1_0_2-stable has been updated
       via  28903862fb0d6351dd88522950375ed44c10d1ba (commit)
      from  348681ff2b30453eb03ce2d83022ef069d86877d (commit)


- Log -----------------------------------------------------------------
commit 28903862fb0d6351dd88522950375ed44c10d1ba
Author: Matt Hauck <matt.hauck at tanium.com>
Date:   Wed Jul 13 11:27:40 2016 -0700

    Fix statically linked engine initialization w/ fips
    
    This only manifested itself with FIPS enabled statically linked
    engines. The OPENSSL_init call ended up invoking RAND_init_fips
    for a FIPS enabled build, which called CRYPTO_malloc, resulting in
    disallowing the engine to finish its IMPLEMENT_DYNAMIC_BIND_FN call.
    
    (Merged from https://github.com/openssl/openssl/pull/1308)Reviewed-by: Geoff Thorpe <geoff at openssl.org>
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    CLA: trivial
    (Merged from https://github.com/openssl/openssl/pull/1308)

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

Summary of changes:
 crypto/mem.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/crypto/mem.c b/crypto/mem.c
index 06c3960..dd4c9ce 100644
--- a/crypto/mem.c
+++ b/crypto/mem.c
@@ -150,12 +150,12 @@ static long (*get_debug_options_func) (void) = NULL;
 int CRYPTO_set_mem_functions(void *(*m) (size_t), void *(*r) (void *, size_t),
                              void (*f) (void *))
 {
-    /* Dummy call just to ensure OPENSSL_init() gets linked in */
-    OPENSSL_init();
     if (!allow_customize)
         return 0;
     if ((m == 0) || (r == 0) || (f == 0))
         return 0;
+    /* Dummy call just to ensure OPENSSL_init() gets linked in */
+    OPENSSL_init();
     malloc_func = m;
     malloc_ex_func = default_malloc_ex;
     realloc_func = r;


More information about the openssl-commits mailing list