summaryrefslogtreecommitdiffstats
path: root/test/evp_test.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-09-04 22:04:08 +0200
committerRichard Levitte <levitte@openssl.org>2019-09-12 17:59:52 +0200
commitb13342e933c507c4ce0eda0a0193339a111f27a5 (patch)
tree27251f00624c771cd42e0f649513ef8330659a40 /test/evp_test.c
parent06ff79bd773d0b4214e4b6a8a1332a3355b17742 (diff)
Modernise the ERR functionality further (new functions and deprecations)
ERR_func_error_string() essentially returns NULL, and since all function codes are now removed for all intents and purposes, this function has fallen out of use and cannot be modified to suit the data, since its only function is to interpret an error code. To compensate for the loss of error code, we instead provide new functions that extracts the function name strings from an error record: - ERR_get_error_func() - ERR_peek_error_func() - ERR_peek_last_error_func() Similarly, the once all encompasing functions ERR_peek_last_error_line_data(), ERR_peek_error_line_data() and ERR_get_error_line_data() lack the capability of getting the function name string, so we deprecate those and add these functions to replace them: - ERR_get_error_all() - ERR_peek_error_all() - ERR_peek_last_error_all() Finally, we adjust a few lines of code that used the now deprecated functions. Fixes #9756 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9756)
Diffstat (limited to 'test/evp_test.c')
-rw-r--r--test/evp_test.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/test/evp_test.c b/test/evp_test.c
index b1194d2bc9..0b5fd5dae3 100644
--- a/test/evp_test.c
+++ b/test/evp_test.c
@@ -2799,7 +2799,6 @@ static void clear_test(EVP_TEST *t)
static int check_test_error(EVP_TEST *t)
{
unsigned long err;
- const char *func;
const char *reason;
if (t->err == NULL && t->expected_err == NULL)
@@ -2842,9 +2841,8 @@ static int check_test_error(EVP_TEST *t)
return 0;
}
- func = ERR_func_error_string(err);
reason = ERR_reason_error_string(err);
- if (func == NULL && reason == NULL) {
+ if (reason == NULL) {
TEST_info("%s:%d: Expected error \"%s\", no strings available."
" Assuming ok.",
t->s.test_file, t->s.start, t->reason);