[openssl-dev] [openssl.org #4685] [PATCH] Add missing prototype for FIPS callback

Dr. Matthias St. Pierre via RT rt at openssl.org
Mon Sep 26 13:41:45 UTC 2016


The call to FIPS_crypto_set_id_callback() was added in revision a43cfd7bb1fc681d563e,
but there is no prototype for it in <openssl/fips.h>.
---

This leads to warnings on some platforms (e.g. x86_64-ncp-linux-gnu-gcc):
o_init.c:77:5: warning: implicit declaration of function 'FIPS_crypto_set_id_callback' [-Wimplicit-function-declaration]

and to an error on iOS (clang -arch arm64):
o_init.c:77:5: error: implicit declaration of function 'FIPS_crypto_set_id_callback' is invalid in C99 [-Werror,-Wimplicit-function-declaration]


 crypto/o_init.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/crypto/o_init.c b/crypto/o_init.c
index 185841e..a399318 100644
--- a/crypto/o_init.c
+++ b/crypto/o_init.c
@@ -74,6 +74,8 @@ void OPENSSL_init(void)
 #ifdef OPENSSL_FIPS
     FIPS_set_locking_callbacks(CRYPTO_lock, CRYPTO_add_lock);
 # ifndef OPENSSL_NO_DEPRECATED
+    /* the prototype is missing in <openssl/fips.h> */
+    void FIPS_crypto_set_id_callback(unsigned long (*func)(void));
     FIPS_crypto_set_id_callback(CRYPTO_thread_id);
 # endif
     FIPS_set_error_callbacks(ERR_put_error, ERR_add_error_vdata);
-- 
2.7.3


-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=4685
Please log in as guest with password guest if prompted



More information about the openssl-dev mailing list