Auto init/deinit libcrypto This builds on the previous commit to auto initialise/deinitialise libcrypto. Reviewed-by: Richard Levitte <levitte@openssl.org>
diff --git a/crypto/err/err.c b/crypto/err/err.c index 64f8adc..7e8bcc1 100644 --- a/crypto/err/err.c +++ b/crypto/err/err.c
@@ -111,7 +111,7 @@ #include <stdio.h> #include <stdarg.h> #include <string.h> -#include "internal/cryptlib.h" +#include <internal/cryptlib_int.h> #include <openssl/lhash.h> #include <openssl/crypto.h> #include <openssl/buffer.h> @@ -894,6 +894,10 @@ * the first one that we just replaced. */ ERR_STATE_free(tmpp); + OPENSSL_INIT_crypto_library_start(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, + NULL); + /* Ignore failures from this */ + ossl_init_thread_start(OPENSSL_INIT_THREAD_ERR_STATE); } return ret; }
diff --git a/crypto/err/err_all.c b/crypto/err/err_all.c index 6309733..ffb1b83 100644 --- a/crypto/err/err_all.c +++ b/crypto/err/err_all.c
@@ -56,6 +56,7 @@ */ #include <stdio.h> +#include <internal/err.h> #include <openssl/asn1.h> #include <openssl/bn.h> #ifndef OPENSSL_NO_EC @@ -103,7 +104,7 @@ #include <internal/ct_int.h> #include <openssl/async.h> -void ERR_load_crypto_strings(void) +void err_load_crypto_strings_intern(void) { #ifdef OPENSSL_FIPS FIPS_set_error_callbacks(ERR_put_error, ERR_add_error_vdata);