summaryrefslogtreecommitdiffstats
path: root/test/evp_test.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-12-16 04:15:02 +0100
committerRichard Levitte <levitte@openssl.org>2016-12-16 14:40:43 +0100
commit5769b5421683293014ed91b292ea39915f5f1eff (patch)
tree703ee5b3de313626046e0db80dd78816db5bf805 /test/evp_test.c
parent46766d003666da5f90346da7e6d09e109355f5c6 (diff)
evp_test: when function and reason strings aren't available, just skip
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2093) (cherry picked from commit cd3fe0e09c97700005ed96c8113907cbdfc45edf)
Diffstat (limited to 'test/evp_test.c')
-rw-r--r--test/evp_test.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/evp_test.c b/test/evp_test.c
index e52ff0c947..b6a7c28e3b 100644
--- a/test/evp_test.c
+++ b/test/evp_test.c
@@ -372,6 +372,12 @@ static int check_test_error(struct evp_test *t)
func = ERR_func_error_string(err);
reason = ERR_reason_error_string(err);
+ if (func == NULL && reason == NULL) {
+ fprintf(stderr, "Test line %d: expected error \"%s:%s\", no strings available. Skipping...\n",
+ t->start_line, t->func, t->reason);
+ return 1;
+ }
+
if (strcmp(func, t->func) == 0 && strcmp(reason, t->reason) == 0)
return 1;