aboutsummaryrefslogtreecommitdiffstats
path: root/test/sslprovidertest.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2020-03-18 17:17:37 +0000
committerMatt Caswell <matt@openssl.org>2020-04-19 14:40:55 +0100
commit5e30f2fd58bac0db5c23e33e865fa70bd6eb4349 (patch)
treeacaf649f6e91384529b104d220e6903f96764c3d /test/sslprovidertest.c
parent09ec5e6f5d08a854d40e4a1847759fc6a5793ec6 (diff)
downloadopenssl-5e30f2fd58bac0db5c23e33e865fa70bd6eb4349.tar.gz
Use a non-default libctx in sslapitest
We also don't load the default provider into the default libctx to make sure there is no accidental "leakage". Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/11508)
Diffstat (limited to 'test/sslprovidertest.c')
-rw-r--r--test/sslprovidertest.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/test/sslprovidertest.c b/test/sslprovidertest.c
index 5f78554fb9..fd29f797aa 100644
--- a/test/sslprovidertest.c
+++ b/test/sslprovidertest.c
@@ -50,20 +50,14 @@ static int test_different_libctx(void)
goto end;
TEST_note("%s provider loaded", modulename);
- cctx = SSL_CTX_new_with_libctx(libctx, NULL, TLS_client_method());
- if (!TEST_ptr(cctx))
- goto end;
- sctx = SSL_CTX_new_with_libctx(libctx, NULL, TLS_server_method());
- if (!TEST_ptr(sctx))
- goto end;
-
/*
* TODO(3.0): Make this work in TLSv1.3. Currently we can only do RSA key
* exchange, because we don't have key gen/param gen for EC yet - which
* implies TLSv1.2 only
*/
- if (!TEST_true(create_ssl_ctx_pair(NULL,
- NULL,
+ if (!TEST_true(create_ssl_ctx_pair(libctx,
+ TLS_server_method(),
+ TLS_client_method(),
TLS1_VERSION,
TLS1_2_VERSION,
&sctx, &cctx, cert, privkey)))