From 146aebc6a082ac4343b79dcf18ef86e853b85d85 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Fri, 26 Jun 2020 20:49:19 +0100 Subject: [PATCH] Add a test to check having a provider loaded without a groups still works As long as we have at least one provider loaded which offers some groups, it doesn't matter if we have others loaded that don't. Reviewed-by: Shane Lontis (Merged from https://github.com/openssl/openssl/pull/12292) --- test/sslapitest.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/sslapitest.c b/test/sslapitest.c index 182984ecb17..afc4ea8d40d 100644 --- a/test/sslapitest.c +++ b/test/sslapitest.c @@ -8235,8 +8235,10 @@ static int test_pluggable_group(void) SSL *clientssl = NULL, *serverssl = NULL; int testresult = 0; OSSL_PROVIDER *tlsprov = OSSL_PROVIDER_load(libctx, "tls-provider"); + /* Check that we are not impacted by a provider without any groups */ + OSSL_PROVIDER *legacyprov = OSSL_PROVIDER_load(libctx, "legacy"); - if (!TEST_ptr(tlsprov)) + if (!TEST_ptr(tlsprov) || !TEST_ptr(legacyprov)) goto end; if (!TEST_true(create_ssl_ctx_pair(libctx, TLS_server_method(), @@ -8263,6 +8265,7 @@ static int test_pluggable_group(void) SSL_CTX_free(sctx); SSL_CTX_free(cctx); OSSL_PROVIDER_unload(tlsprov); + OSSL_PROVIDER_unload(legacyprov); return testresult; } -- 2.47.2