Set FIPS thread id callback.
Fixes #4180
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4192)
Dr. Stephen Henson
6 years ago
468 | 468 | } |
469 | 469 | } |
470 | 470 | |
471 | #ifdef OPENSSL_FIPS | |
472 | extern int FIPS_crypto_threadid_set_callback(void (*func) (CRYPTO_THREADID *)); | |
473 | #endif | |
474 | ||
471 | 475 | int CRYPTO_THREADID_set_callback(void (*func) (CRYPTO_THREADID *)) |
472 | 476 | { |
473 | 477 | if (threadid_callback) |
474 | 478 | return 0; |
475 | 479 | threadid_callback = func; |
480 | #ifdef OPENSSL_FIPS | |
481 | FIPS_crypto_threadid_set_callback(func); | |
482 | #endif | |
476 | 483 | return 1; |
477 | 484 | } |
478 | 485 |