提交 cd3fe0e0 编写于 作者: R Richard Levitte

evp_test: when function and reason strings aren't available, just skip

Reviewed-by: NRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2093)
上级 7d9533bf
...@@ -372,6 +372,12 @@ static int check_test_error(struct evp_test *t) ...@@ -372,6 +372,12 @@ static int check_test_error(struct evp_test *t)
func = ERR_func_error_string(err); func = ERR_func_error_string(err);
reason = ERR_reason_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) if (strcmp(func, t->func) == 0 && strcmp(reason, t->reason) == 0)
return 1; return 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册