aboutsummaryrefslogtreecommitdiff
path: root/test/testutil/tests.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2017-04-28 14:48:13 +0200
committerRichard Levitte <levitte@openssl.org>2017-04-28 15:59:46 +0200
commit68e49bf22384c33494886eb95d78f1f69f433781 (patch)
treeb8cbbef2d6a6ce3779d873d809c88ce99ec2ae8f /test/testutil/tests.c
parent603ddbdb7527710c293a762aa5eed51ad05646b3 (diff)
downloadopenssl-68e49bf22384c33494886eb95d78f1f69f433781.zip
openssl-68e49bf22384c33494886eb95d78f1f69f433781.tar.gz
openssl-68e49bf22384c33494886eb95d78f1f69f433781.tar.bz2
testutil: Add OpenSSL error stack printing wrapper TEST_openssl_errors
Also added a internal error printing callback to be used both with ERR_print_errors_cb() and with CRYPTO_mem_leaks_cb Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3345)
Diffstat (limited to 'test/testutil/tests.c')
-rw-r--r--test/testutil/tests.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/testutil/tests.c b/test/testutil/tests.c
index 6dfe242..0efaa06 100644
--- a/test/testutil/tests.c
+++ b/test/testutil/tests.c
@@ -111,6 +111,11 @@ void test_error(const char *file, int line, const char *desc, ...)
va_end(ap);
}
+void test_openssl_errors(void)
+{
+ ERR_print_errors_cb(openssl_error_cb, NULL);
+}
+
/*
* Define some comparisons between pairs of various types.
* These functions return 1 if the test is true.