Reputation: 297
I am getting the following error when try to integrate upgrade OpenSSL from version 1.0.2h to 1.0.2j.
o_init.c:77:5: error: implicit declaration of function 'FIPS_crypto_set_id_callback' is
invalid in C99 [-Werror,-Wimplicit-function-declaration]
FIPS_crypto_set_id_callback(CRYPTO_thread_id);
Upvotes: 0
Views: 2076
Reputation: 21
That method call is wrapped with "#ifndef OPENSSL_NO_DEPRECATED", which looks like code that has been back-ported from the 1.1.0 branch.
The change history of 1.1.0 implies that they have been changing code to improve the management of the OpenSSL API level. You could try adding "no-deprecated" to your "configure" parameters, but I'm dubious about that since it looks to be a 1.1.0 configuration option. Alternatively patch the source to remove the new 3 lines of code, since your previous version wasn't calling the deprecated method anyway.
--- a/crypto/o_init.c
+++ b/crypto/o_init.c
@@ -73,9 +73,6 @@
done = 1;
#ifdef OPENSSL_FIPS
FIPS_set_locking_callbacks(CRYPTO_lock, CRYPTO_add_lock);
-# ifndef OPENSSL_NO_DEPRECATED
- FIPS_crypto_set_id_callback(CRYPTO_thread_id);
-# endif
FIPS_set_error_callbacks(ERR_put_error, ERR_add_error_vdata);
FIPS_set_malloc_callbacks(CRYPTO_malloc, CRYPTO_free);
RAND_init_fips();
Upvotes: 2