diff options
Diffstat (limited to 'src/lib/libcrypto/err/err_all.c')
-rw-r--r-- | src/lib/libcrypto/err/err_all.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/lib/libcrypto/err/err_all.c b/src/lib/libcrypto/err/err_all.c index 40009cbe88..24de3c9c15 100644 --- a/src/lib/libcrypto/err/err_all.c +++ b/src/lib/libcrypto/err/err_all.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: err_all.c,v 1.23 2016/10/19 16:49:11 jsing Exp $ */ | 1 | /* $OpenBSD: err_all.c,v 1.24 2018/03/17 16:20:01 beck Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -56,6 +56,7 @@ | |||
56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
57 | */ | 57 | */ |
58 | 58 | ||
59 | #include <pthread.h> | ||
59 | #include <stdio.h> | 60 | #include <stdio.h> |
60 | 61 | ||
61 | #include <openssl/opensslconf.h> | 62 | #include <openssl/opensslconf.h> |
@@ -103,11 +104,13 @@ | |||
103 | #include <openssl/gost.h> | 104 | #include <openssl/gost.h> |
104 | #endif | 105 | #endif |
105 | 106 | ||
106 | void | 107 | void ERR_load_ERR_strings_internal(void); |
107 | ERR_load_crypto_strings(void) | 108 | |
109 | static void | ||
110 | ERR_load_crypto_strings_internal(void) | ||
108 | { | 111 | { |
109 | #ifndef OPENSSL_NO_ERR | 112 | #ifndef OPENSSL_NO_ERR |
110 | ERR_load_ERR_strings(); /* include error strings for SYSerr */ | 113 | ERR_load_ERR_strings_internal(); /* include error strings for SYSerr */ |
111 | ERR_load_BN_strings(); | 114 | ERR_load_BN_strings(); |
112 | #ifndef OPENSSL_NO_RSA | 115 | #ifndef OPENSSL_NO_RSA |
113 | ERR_load_RSA_strings(); | 116 | ERR_load_RSA_strings(); |
@@ -153,3 +156,10 @@ ERR_load_crypto_strings(void) | |||
153 | #endif | 156 | #endif |
154 | #endif | 157 | #endif |
155 | } | 158 | } |
159 | |||
160 | void | ||
161 | ERR_load_crypto_strings(void) | ||
162 | { | ||
163 | static pthread_once_t loaded = PTHREAD_ONCE_INIT; | ||
164 | (void) pthread_once(&loaded, ERR_load_crypto_strings_internal); | ||
165 | } | ||