diff options
author | Matt Caswell <matt@openssl.org> | 2020-04-07 16:22:49 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2020-04-20 11:25:56 +0100 |
commit | ab5a02f70726e28b3c39391aac29a4aedb080ea3 (patch) | |
tree | 368badd16c3f6ed604b3baabe8ccc18518a301f0 /test/ssl_test.c | |
parent | fea4e2bd36584cebb79f45680c6da0c14fde3d1e (diff) | |
download | openssl-new-ab5a02f70726e28b3c39391aac29a4aedb080ea3.tar.gz |
Teach ssl_test_new to have different tests for different loaded providers
We now run the tests twice: Once with no specific providers loaded and
just using the default libctx, and a second time with a non-default libctx
and the default provider.
In the second run we disable tests which use a PSS cert/key because we
don't yet have support for that.
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/11511)
Diffstat (limited to 'test/ssl_test.c')
-rw-r--r-- | test/ssl_test.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/test/ssl_test.c b/test/ssl_test.c index 6715cd69d5..c4f1c6006e 100644 --- a/test/ssl_test.c +++ b/test/ssl_test.c @@ -533,14 +533,16 @@ int setup_tests(void) if (!TEST_ptr(modulename = test_get_argument(1))) return 0; - defctxnull = OSSL_PROVIDER_load(NULL, "null"); - libctx = OPENSSL_CTX_new(); - if (!TEST_ptr(libctx)) - return 0; + if (strcmp(modulename, "none") != 0) { + defctxnull = OSSL_PROVIDER_load(NULL, "null"); + libctx = OPENSSL_CTX_new(); + if (!TEST_ptr(libctx)) + return 0; - thisprov = OSSL_PROVIDER_load(libctx, modulename); - if (!TEST_ptr(thisprov)) - return 0; + thisprov = OSSL_PROVIDER_load(libctx, modulename); + if (!TEST_ptr(thisprov)) + return 0; + } ADD_ALL_TESTS(test_handshake, (int)num_tests); return 1; |