diff options
author | Matt Caswell <matt@openssl.org> | 2017-05-10 10:54:18 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2017-05-10 16:49:00 +0100 |
commit | bb01ef3f4ae3b54b20e0c3afc9b55e43a92fef8f (patch) | |
tree | 107788d9975248f2e3871471dcc0104b7e8106ce /test/ssltestlib.c | |
parent | 21181889d78f95f10738813285f681acd3b32c6c (diff) | |
download | openssl-bb01ef3f4ae3b54b20e0c3afc9b55e43a92fef8f.tar.gz |
Add a test for SNI in conjunction with custom extensions
Test that custom extensions still work even after a change in SSL_CTX due
to SNI. See #2180.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3425)
Diffstat (limited to 'test/ssltestlib.c')
-rw-r--r-- | test/ssltestlib.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/ssltestlib.c b/test/ssltestlib.c index 9bce0d32d1..1f74c95925 100644 --- a/test/ssltestlib.c +++ b/test/ssltestlib.c @@ -518,7 +518,7 @@ int create_ssl_ctx_pair(const SSL_METHOD *sm, const SSL_METHOD *cm, SSL_CTX *clientctx = NULL; if (!TEST_ptr(serverctx = SSL_CTX_new(sm)) - || !TEST_ptr(clientctx = SSL_CTX_new(cm))) + || (cctx != NULL && !TEST_ptr(clientctx = SSL_CTX_new(cm)))) goto err; if (!TEST_int_eq(SSL_CTX_use_certificate_file(serverctx, certfile, @@ -533,7 +533,8 @@ int create_ssl_ctx_pair(const SSL_METHOD *sm, const SSL_METHOD *cm, #endif *sctx = serverctx; - *cctx = clientctx; + if (cctx != NULL) + *cctx = clientctx; return 1; err: |