diff options
author | Matt Caswell <matt@openssl.org> | 2020-12-02 12:03:31 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2020-12-11 10:56:22 +0000 |
commit | 5ae54dbac17b1408f70dfc273cd467734d065767 (patch) | |
tree | c1fe75d90bebb0ace72263e8fc48b50320ac98c7 | |
parent | 3a43b30ebb2bea7d3a45767751dd695bb9903630 (diff) | |
download | openssl-5ae54dbac17b1408f70dfc273cd467734d065767.tar.gz |
Fix sslapitest.c if built with no-legacy
We skip a test that uses the no-legacy option. Unfortuantely there is
no OPENSSL_NO_LEGACY to test, so we just check whether we were successful
in loading the legacy provider - and if not we skip the test.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13595)
-rw-r--r-- | test/sslapitest.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/sslapitest.c b/test/sslapitest.c index 6683fccbed..915387a87c 100644 --- a/test/sslapitest.c +++ b/test/sslapitest.c @@ -7972,9 +7972,18 @@ static int test_pluggable_group(int idx) OSSL_PROVIDER *legacyprov = OSSL_PROVIDER_load(libctx, "legacy"); const char *group_name = idx == 0 ? "xorgroup" : "xorkemgroup"; - if (!TEST_ptr(tlsprov) || !TEST_ptr(legacyprov)) + if (!TEST_ptr(tlsprov)) goto end; + if (legacyprov == NULL) { + /* + * In this case we assume we've been built with "no-legacy" and skip + * this test (there is no OPENSSL_NO_LEGACY) + */ + testresult = 1; + goto end; + } + if (!TEST_true(create_ssl_ctx_pair(libctx, TLS_server_method(), TLS_client_method(), TLS1_3_VERSION, |