-/* $OpenBSD: tlsexttest.c,v 1.52 2021/11/01 16:39:01 jsing Exp $ */
+/* $OpenBSD: tlsexttest.c,v 1.53 2021/11/02 14:39:09 jsing Exp $ */
/*
* Copyright (c) 2017 Joel Sing <jsing@openbsd.org>
* Copyright (c) 2017 Doug Hogan <doug@openbsd.org>
goto err;
}
+ /*
+ * SSL_set_tlsext_host_name() may be called with a NULL host name to
+ * disable SNI.
+ */
+ if (!SSL_set_tlsext_host_name(ssl, NULL)) {
+ FAIL("cannot set host name to NULL");
+ goto err;
+ }
+
+ if (tlsext_sni_client_needs(ssl, SSL_TLSEXT_MSG_CH)) {
+ FAIL("client should not need SNI\n");
+ goto err;
+ }
+
if ((ssl->session = SSL_SESSION_new()) == NULL) {
FAIL("failed to create session");
goto err;