Set FIPS thread id callback.
authorDr. Stephen Henson <steve@openssl.org>
Fri, 18 Aug 2017 16:58:05 +0000 (17:58 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Fri, 18 Aug 2017 17:34:34 +0000 (18:34 +0100)
Fixes #4180

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4192)

crypto/cryptlib.c

index 1925428f5ec5324a01a10e12fbeac9f5e4f238a5..5fab45b2ec85be8d97ecfddd868689e9e1984af5 100644 (file)
@@ -469,11 +469,18 @@ void CRYPTO_THREADID_set_pointer(CRYPTO_THREADID *id, void *ptr)
     }
 }
 
+#ifdef OPENSSL_FIPS
+extern int FIPS_crypto_threadid_set_callback(void (*func) (CRYPTO_THREADID *));
+#endif
+
 int CRYPTO_THREADID_set_callback(void (*func) (CRYPTO_THREADID *))
 {
     if (threadid_callback)
         return 0;
     threadid_callback = func;
+#ifdef OPENSSL_FIPS
+    FIPS_crypto_threadid_set_callback(func);
+#endif
     return 1;
 }