diff options
author | 2017-07-23 16:27:44 +0000 | |
---|---|---|
committer | 2017-07-23 16:27:44 +0000 | |
commit | ab7d0965f2404dbdba2679ebd94ea2ba599e0100 (patch) | |
tree | d866b45870f845451006a10538e68ebd467e7785 /lib/libssl/t1_lib.c | |
parent | Don't hit pledge(2) restrictions on interface departure (diff) | |
download | wireguard-openbsd-ab7d0965f2404dbdba2679ebd94ea2ba599e0100.tar.xz wireguard-openbsd-ab7d0965f2404dbdba2679ebd94ea2ba599e0100.zip |
Hook the TLS extension parsing framework into the serverhello parsing.
Missed in the original commit.
Diffstat (limited to 'lib/libssl/t1_lib.c')
-rw-r--r-- | lib/libssl/t1_lib.c | 7 |
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; |