diff options
-rw-r--r-- | src/lib/libcrypto/Symbols.list | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/Symbols.namespace | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/err/err.c | 31 | ||||
-rw-r--r-- | src/lib/libcrypto/err/err.h | 11 | ||||
-rw-r--r-- | src/lib/libcrypto/hidden/openssl/err.h | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/ossl_typ.h | 4 |
6 files changed, 6 insertions, 48 deletions
diff --git a/src/lib/libcrypto/Symbols.list b/src/lib/libcrypto/Symbols.list index 8129d9f182..6a739fa193 100644 --- a/src/lib/libcrypto/Symbols.list +++ b/src/lib/libcrypto/Symbols.list | |||
@@ -1123,7 +1123,6 @@ ERR_get_err_state_table | |||
1123 | ERR_get_error | 1123 | ERR_get_error |
1124 | ERR_get_error_line | 1124 | ERR_get_error_line |
1125 | ERR_get_error_line_data | 1125 | ERR_get_error_line_data |
1126 | ERR_get_implementation | ||
1127 | ERR_get_next_error_library | 1126 | ERR_get_next_error_library |
1128 | ERR_get_state | 1127 | ERR_get_state |
1129 | ERR_get_string_table | 1128 | ERR_get_string_table |
@@ -1170,7 +1169,6 @@ ERR_release_err_state_table | |||
1170 | ERR_remove_state | 1169 | ERR_remove_state |
1171 | ERR_remove_thread_state | 1170 | ERR_remove_thread_state |
1172 | ERR_set_error_data | 1171 | ERR_set_error_data |
1173 | ERR_set_implementation | ||
1174 | ERR_set_mark | 1172 | ERR_set_mark |
1175 | ERR_unload_strings | 1173 | ERR_unload_strings |
1176 | ESS_CERT_ID_dup | 1174 | ESS_CERT_ID_dup |
diff --git a/src/lib/libcrypto/Symbols.namespace b/src/lib/libcrypto/Symbols.namespace index dcf70a63e6..721c111ff4 100644 --- a/src/lib/libcrypto/Symbols.namespace +++ b/src/lib/libcrypto/Symbols.namespace | |||
@@ -1396,8 +1396,6 @@ _libre_ERR_release_err_state_table | |||
1396 | _libre_ERR_get_next_error_library | 1396 | _libre_ERR_get_next_error_library |
1397 | _libre_ERR_set_mark | 1397 | _libre_ERR_set_mark |
1398 | _libre_ERR_pop_to_mark | 1398 | _libre_ERR_pop_to_mark |
1399 | _libre_ERR_get_implementation | ||
1400 | _libre_ERR_set_implementation | ||
1401 | _libre_RAND_set_rand_method | 1399 | _libre_RAND_set_rand_method |
1402 | _libre_RAND_get_rand_method | 1400 | _libre_RAND_get_rand_method |
1403 | _libre_RAND_SSLeay | 1401 | _libre_RAND_SSLeay |
diff --git a/src/lib/libcrypto/err/err.c b/src/lib/libcrypto/err/err.c index 8fbeea715e..8beb29543a 100644 --- a/src/lib/libcrypto/err/err.c +++ b/src/lib/libcrypto/err/err.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: err.c,v 1.54 2023/07/07 19:37:53 beck Exp $ */ | 1 | /* $OpenBSD: err.c,v 1.55 2023/07/28 10:21:01 tb 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 | * |
@@ -125,6 +125,8 @@ | |||
125 | DECLARE_LHASH_OF(ERR_STRING_DATA); | 125 | DECLARE_LHASH_OF(ERR_STRING_DATA); |
126 | DECLARE_LHASH_OF(ERR_STATE); | 126 | DECLARE_LHASH_OF(ERR_STATE); |
127 | 127 | ||
128 | typedef struct st_ERR_FNS ERR_FNS; | ||
129 | |||
128 | static void err_load_strings(int lib, ERR_STRING_DATA *str); | 130 | static void err_load_strings(int lib, ERR_STRING_DATA *str); |
129 | 131 | ||
130 | static void ERR_STATE_free(ERR_STATE *s); | 132 | static void ERR_STATE_free(ERR_STATE *s); |
@@ -300,33 +302,6 @@ err_fns_check(void) | |||
300 | CRYPTO_w_unlock(CRYPTO_LOCK_ERR); | 302 | CRYPTO_w_unlock(CRYPTO_LOCK_ERR); |
301 | } | 303 | } |
302 | 304 | ||
303 | /* API functions to get or set the underlying ERR functions. */ | ||
304 | |||
305 | const ERR_FNS * | ||
306 | ERR_get_implementation(void) | ||
307 | { | ||
308 | err_fns_check(); | ||
309 | return err_fns; | ||
310 | } | ||
311 | LCRYPTO_ALIAS(ERR_get_implementation); | ||
312 | |||
313 | int | ||
314 | ERR_set_implementation(const ERR_FNS *fns) | ||
315 | { | ||
316 | int ret = 0; | ||
317 | |||
318 | CRYPTO_w_lock(CRYPTO_LOCK_ERR); | ||
319 | /* It's too late if 'err_fns' is non-NULL. BTW: not much point setting | ||
320 | * an error is there?! */ | ||
321 | if (!err_fns) { | ||
322 | err_fns = fns; | ||
323 | ret = 1; | ||
324 | } | ||
325 | CRYPTO_w_unlock(CRYPTO_LOCK_ERR); | ||
326 | return ret; | ||
327 | } | ||
328 | LCRYPTO_ALIAS(ERR_set_implementation); | ||
329 | |||
330 | /* These are the callbacks provided to "lh_new()" when creating the LHASH tables | 305 | /* These are the callbacks provided to "lh_new()" when creating the LHASH tables |
331 | * internal to the "err_defaults" implementation. */ | 306 | * internal to the "err_defaults" implementation. */ |
332 | 307 | ||
diff --git a/src/lib/libcrypto/err/err.h b/src/lib/libcrypto/err/err.h index b61599d508..703817be33 100644 --- a/src/lib/libcrypto/err/err.h +++ b/src/lib/libcrypto/err/err.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: err.h,v 1.29 2023/04/09 19:10:23 tb Exp $ */ | 1 | /* $OpenBSD: err.h,v 1.30 2023/07/28 10:21:01 tb 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 | * |
@@ -410,15 +410,6 @@ int ERR_get_next_error_library(void); | |||
410 | int ERR_set_mark(void); | 410 | int ERR_set_mark(void); |
411 | int ERR_pop_to_mark(void); | 411 | int ERR_pop_to_mark(void); |
412 | 412 | ||
413 | /* Already defined in ossl_typ.h */ | ||
414 | /* typedef struct st_ERR_FNS ERR_FNS; */ | ||
415 | /* An application can use this function and provide the return value to loaded | ||
416 | * modules that should use the application's ERR state/functionality */ | ||
417 | const ERR_FNS *ERR_get_implementation(void); | ||
418 | /* A loaded module should call this function prior to any ERR operations using | ||
419 | * the application's "ERR_FNS". */ | ||
420 | int ERR_set_implementation(const ERR_FNS *fns); | ||
421 | |||
422 | #ifdef __cplusplus | 413 | #ifdef __cplusplus |
423 | } | 414 | } |
424 | #endif | 415 | #endif |
diff --git a/src/lib/libcrypto/hidden/openssl/err.h b/src/lib/libcrypto/hidden/openssl/err.h index bc2a96644c..c53feb89f4 100644 --- a/src/lib/libcrypto/hidden/openssl/err.h +++ b/src/lib/libcrypto/hidden/openssl/err.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: err.h,v 1.2 2023/07/07 19:37:54 beck Exp $ */ | 1 | /* $OpenBSD: err.h,v 1.3 2023/07/28 10:21:01 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2023 Bob Beck <beck@openbsd.org> | 3 | * Copyright (c) 2023 Bob Beck <beck@openbsd.org> |
4 | * | 4 | * |
@@ -60,7 +60,5 @@ LCRYPTO_USED(ERR_release_err_state_table); | |||
60 | LCRYPTO_USED(ERR_get_next_error_library); | 60 | LCRYPTO_USED(ERR_get_next_error_library); |
61 | LCRYPTO_USED(ERR_set_mark); | 61 | LCRYPTO_USED(ERR_set_mark); |
62 | LCRYPTO_USED(ERR_pop_to_mark); | 62 | LCRYPTO_USED(ERR_pop_to_mark); |
63 | LCRYPTO_USED(ERR_get_implementation); | ||
64 | LCRYPTO_USED(ERR_set_implementation); | ||
65 | 63 | ||
66 | #endif /* _LIBCRYPTO_ERR_H */ | 64 | #endif /* _LIBCRYPTO_ERR_H */ |
diff --git a/src/lib/libcrypto/ossl_typ.h b/src/lib/libcrypto/ossl_typ.h index b58888de3b..5da4243f80 100644 --- a/src/lib/libcrypto/ossl_typ.h +++ b/src/lib/libcrypto/ossl_typ.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ossl_typ.h,v 1.27 2023/07/28 09:22:26 tb Exp $ */ | 1 | /* $OpenBSD: ossl_typ.h,v 1.28 2023/07/28 10:21:01 tb Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -150,8 +150,6 @@ typedef struct store_method_st STORE_METHOD; | |||
150 | typedef struct ui_st UI; | 150 | typedef struct ui_st UI; |
151 | typedef struct ui_method_st UI_METHOD; | 151 | typedef struct ui_method_st UI_METHOD; |
152 | 152 | ||
153 | typedef struct st_ERR_FNS ERR_FNS; | ||
154 | |||
155 | typedef struct engine_st ENGINE; | 153 | typedef struct engine_st ENGINE; |
156 | typedef struct ssl_st SSL; | 154 | typedef struct ssl_st SSL; |
157 | typedef struct ssl_ctx_st SSL_CTX; | 155 | typedef struct ssl_ctx_st SSL_CTX; |