diff options
| author | jsing <> | 2021-11-02 14:39:09 +0000 |
|---|---|---|
| committer | jsing <> | 2021-11-02 14:39:09 +0000 |
| commit | 76e9f577da320593c54eb46e4ae17bbf74fec42b (patch) | |
| tree | e17a8cf5da503f2e6f25771f821e26bd23b514cf /src | |
| parent | 861cb5567903704da143ec766cc7858c5a7e0188 (diff) | |
| download | openbsd-76e9f577da320593c54eb46e4ae17bbf74fec42b.tar.gz openbsd-76e9f577da320593c54eb46e4ae17bbf74fec42b.tar.bz2 openbsd-76e9f577da320593c54eb46e4ae17bbf74fec42b.zip | |
Add regress that calls SSL_set_tlsext_host_name() with a NULL host name.
Diffstat (limited to 'src')
| -rw-r--r-- | src/regress/lib/libssl/tlsext/tlsexttest.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/regress/lib/libssl/tlsext/tlsexttest.c b/src/regress/lib/libssl/tlsext/tlsexttest.c index 21e096cf60..9bd438f24b 100644 --- a/src/regress/lib/libssl/tlsext/tlsexttest.c +++ b/src/regress/lib/libssl/tlsext/tlsexttest.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: tlsexttest.c,v 1.52 2021/11/01 16:39:01 jsing Exp $ */ | 1 | /* $OpenBSD: tlsexttest.c,v 1.53 2021/11/02 14:39:09 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2017 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2017 Joel Sing <jsing@openbsd.org> |
| 4 | * Copyright (c) 2017 Doug Hogan <doug@openbsd.org> | 4 | * Copyright (c) 2017 Doug Hogan <doug@openbsd.org> |
| @@ -1722,6 +1722,20 @@ test_tlsext_sni_client(void) | |||
| 1722 | goto err; | 1722 | goto err; |
| 1723 | } | 1723 | } |
| 1724 | 1724 | ||
| 1725 | /* | ||
| 1726 | * SSL_set_tlsext_host_name() may be called with a NULL host name to | ||
| 1727 | * disable SNI. | ||
| 1728 | */ | ||
| 1729 | if (!SSL_set_tlsext_host_name(ssl, NULL)) { | ||
| 1730 | FAIL("cannot set host name to NULL"); | ||
| 1731 | goto err; | ||
| 1732 | } | ||
| 1733 | |||
| 1734 | if (tlsext_sni_client_needs(ssl, SSL_TLSEXT_MSG_CH)) { | ||
| 1735 | FAIL("client should not need SNI\n"); | ||
| 1736 | goto err; | ||
| 1737 | } | ||
| 1738 | |||
| 1725 | if ((ssl->session = SSL_SESSION_new()) == NULL) { | 1739 | if ((ssl->session = SSL_SESSION_new()) == NULL) { |
| 1726 | FAIL("failed to create session"); | 1740 | FAIL("failed to create session"); |
| 1727 | goto err; | 1741 | goto err; |
