diff options
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/err/err.c | 26 | ||||
-rw-r--r-- | crypto/err/err_blocks.c | 6 | ||||
-rw-r--r-- | crypto/err/err_locl.h | 2 |
3 files changed, 22 insertions, 12 deletions
diff --git a/crypto/err/err.c b/crypto/err/err.c index 25426be730..51115fd00a 100644 --- a/crypto/err/err.c +++ b/crypto/err/err.c @@ -365,7 +365,7 @@ void ERR_clear_error(void) int i; ERR_STATE *es; - es = ERR_get_state(); + es = err_get_state_int(); if (es == NULL) return; @@ -488,7 +488,7 @@ static unsigned long get_error_values(int inc, int top, const char **file, ERR_STATE *es; unsigned long ret; - es = ERR_get_state(); + es = err_get_state_int(); if (es == NULL) return 0; @@ -685,7 +685,7 @@ DEFINE_RUN_ONCE_STATIC(err_do_init) return CRYPTO_THREAD_init_local(&err_thread_local, NULL); } -ERR_STATE *ERR_get_state(void) +ERR_STATE *err_get_state_int(void) { ERR_STATE *state; int saveerrno = get_last_sys_error(); @@ -724,6 +724,14 @@ ERR_STATE *ERR_get_state(void) return state; } +#if !OPENSSL_API_3 +ERR_STATE *ERR_get_state(void) +{ + return err_get_state_int(); +} +#endif + + /* * err_shelve_state returns the current thread local error state * and freezes the error module until err_unshelve_state is called. @@ -786,7 +794,7 @@ static int err_set_error_data_int(char *data, size_t size, int flags, { ERR_STATE *es; - es = ERR_get_state(); + es = err_get_state_int(); if (es == NULL) return 0; @@ -831,7 +839,7 @@ void ERR_add_error_vdata(int num, va_list args) ERR_STATE *es; /* Get the current error data; if an allocated string get it. */ - es = ERR_get_state(); + es = err_get_state_int(); if (es == NULL) return; i = es->top; @@ -886,7 +894,7 @@ int ERR_set_mark(void) { ERR_STATE *es; - es = ERR_get_state(); + es = err_get_state_int(); if (es == NULL) return 0; @@ -900,7 +908,7 @@ int ERR_pop_to_mark(void) { ERR_STATE *es; - es = ERR_get_state(); + es = err_get_state_int(); if (es == NULL) return 0; @@ -921,7 +929,7 @@ int ERR_clear_last_mark(void) ERR_STATE *es; int top; - es = ERR_get_state(); + es = err_get_state_int(); if (es == NULL) return 0; @@ -942,7 +950,7 @@ void err_clear_last_constant_time(int clear) ERR_STATE *es; int top; - es = ERR_get_state(); + es = err_get_state_int(); if (es == NULL) return; diff --git a/crypto/err/err_blocks.c b/crypto/err/err_blocks.c index c2ff7c0823..e50f580b33 100644 --- a/crypto/err/err_blocks.c +++ b/crypto/err/err_blocks.c @@ -18,7 +18,7 @@ void ERR_new(void) { ERR_STATE *es; - es = ERR_get_state(); + es = err_get_state_int(); if (es == NULL) return; @@ -31,7 +31,7 @@ void ERR_set_debug(const char *file, int line, const char *func) { ERR_STATE *es; - es = ERR_get_state(); + es = err_get_state_int(); if (es == NULL) return; @@ -55,7 +55,7 @@ void ERR_vset_error(int lib, int reason, const char *fmt, va_list args) unsigned long flags = 0; size_t i; - es = ERR_get_state(); + es = err_get_state_int(); if (es == NULL) return; i = es->top; diff --git a/crypto/err/err_locl.h b/crypto/err/err_locl.h index d45a00e746..0374bf6a6f 100644 --- a/crypto/err/err_locl.h +++ b/crypto/err/err_locl.h @@ -66,3 +66,5 @@ static ossl_inline void err_clear(ERR_STATE *es, size_t i, int deall) es->err_file[i] = NULL; es->err_line[i] = -1; } + +ERR_STATE *err_get_state_int(void); |