[openssl] OpenSSL_1_1_1-stable update
Matt Caswell
matt at openssl.org
Wed Feb 12 10:58:29 UTC 2020
The branch OpenSSL_1_1_1-stable has been updated
via 2ba3e6538567fffec1f169668a571c8ad8f766fa (commit)
from ff6d0a6313a9082965f798a3102539b8d83a6a39 (commit)
- Log -----------------------------------------------------------------
commit 2ba3e6538567fffec1f169668a571c8ad8f766fa
Author: Matt Caswell <matt at openssl.org>
Date: Tue Feb 4 17:11:07 2020 +0000
Fix no-tls1_3
The hostname_cb in sslapitest.c was originally only defined if TLSv1.3
was enabled. A recently added test now uses this unconditionally, so we
move the function implementation earlier in the file, and always compile
it in.
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11014)
(cherry picked from commit 104a733df65dfd8c3dd110de9bd56f6ebfc8f2f6)
-----------------------------------------------------------------------
Summary of changes:
test/sslapitest.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/test/sslapitest.c b/test/sslapitest.c
index fff6d9b5e1..94a3d5f5fd 100644
--- a/test/sslapitest.c
+++ b/test/sslapitest.c
@@ -98,6 +98,17 @@ static unsigned char serverinfov2[] = {
0xff /* Dummy extension data */
};
+static int hostname_cb(SSL *s, int *al, void *arg)
+{
+ const char *hostname = SSL_get_servername(s, TLSEXT_NAMETYPE_host_name);
+
+ if (hostname != NULL && (strcmp(hostname, "goodhost") == 0
+ || strcmp(hostname, "altgoodhost") == 0))
+ return SSL_TLSEXT_ERR_OK;
+
+ return SSL_TLSEXT_ERR_NOACK;
+}
+
static void client_keylog_callback(const SSL *ssl, const char *line)
{
int line_length = strlen(line);
@@ -2737,17 +2748,6 @@ static int test_early_data_not_sent(int idx)
return testresult;
}
-static int hostname_cb(SSL *s, int *al, void *arg)
-{
- const char *hostname = SSL_get_servername(s, TLSEXT_NAMETYPE_host_name);
-
- if (hostname != NULL && (strcmp(hostname, "goodhost") == 0
- || strcmp(hostname, "altgoodhost") == 0))
- return SSL_TLSEXT_ERR_OK;
-
- return SSL_TLSEXT_ERR_NOACK;
-}
-
static const char *servalpn;
static int alpn_select_cb(SSL *ssl, const unsigned char **out,
More information about the openssl-commits
mailing list