summaryrefslogtreecommitdiffstats
path: root/crypto/err
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-02-08 16:43:03 +0000
committerMatt Caswell <matt@openssl.org>2016-02-09 15:11:38 +0000
commit7b9f8f7f03eda2faa1cdd42ed29a0b70e60eaf59 (patch)
tree30f805756265bd1d016aead84dcf1c909cca8b4b /crypto/err
parentb184e3ef73200cb3b7914a603b43a5b8a074c85f (diff)
Auto init/deinit libcrypto
This builds on the previous commit to auto initialise/deinitialise libcrypto. Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/err')
-rw-r--r--crypto/err/err.c6
-rw-r--r--crypto/err/err_all.c3
2 files changed, 7 insertions, 2 deletions
diff --git a/crypto/err/err.c b/crypto/err/err.c
index 64f8adc46d..7e8bcc1cce 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 @@ ERR_STATE *ERR_get_state(void)
* 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 6309733fb6..ffb1b834c7 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);