summaryrefslogtreecommitdiffstats
path: root/lib/libssl/t1_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libssl/t1_lib.c')
-rw-r--r--lib/libssl/t1_lib.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libssl/t1_lib.c b/lib/libssl/t1_lib.c
index 855ab7ee336..8d56e747596 100644
--- a/lib/libssl/t1_lib.c
+++ b/lib/libssl/t1_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: t1_lib.c,v 1.119 2017/07/19 17:45:31 jsing Exp $ */
+/* $OpenBSD: t1_lib.c,v 1.120 2017/07/23 16:27:44 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -1555,6 +1555,7 @@ ssl_parse_serverhello_tlsext(SSL *s, unsigned char **p, size_t n, int *al)
unsigned char *end = *p + n;
int tlsext_servername = 0;
int renegotiate_seen = 0;
+ CBS cbs;
S3I(s)->next_proto_neg_seen = 0;
free(S3I(s)->alpn_selected);
@@ -1581,6 +1582,10 @@ ssl_parse_serverhello_tlsext(SSL *s, unsigned char **p, size_t n, int *al)
s->internal->tlsext_debug_cb(s, 1, type, data, size,
s->internal->tlsext_debug_arg);
+ CBS_init(&cbs, data, size);
+ if (!tlsext_serverhello_parse_one(s, &cbs, type, al))
+ return 0;
+
if (type == TLSEXT_TYPE_server_name) {
if (s->tlsext_hostname == NULL || size > 0) {
*al = TLS1_AD_UNRECOGNIZED_NAME;