diff options
author | jsing <> | 2017-07-23 16:27:44 +0000 |
---|---|---|
committer | jsing <> | 2017-07-23 16:27:44 +0000 |
commit | d6011d52b96722a292a3849d4f6c034339a53006 (patch) | |
tree | f03df9bdac69ab7329d5d24a2ca65678cbbef954 /src/lib | |
parent | 6adbb1bdd882a76ebb11f5cd35da291c9467b702 (diff) | |
download | openbsd-d6011d52b96722a292a3849d4f6c034339a53006.tar.gz openbsd-d6011d52b96722a292a3849d4f6c034339a53006.tar.bz2 openbsd-d6011d52b96722a292a3849d4f6c034339a53006.zip |
Hook the TLS extension parsing framework into the serverhello parsing.
Missed in the original commit.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libssl/t1_lib.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/libssl/t1_lib.c b/src/lib/libssl/t1_lib.c index 855ab7ee33..8d56e74759 100644 --- a/src/lib/libssl/t1_lib.c +++ b/src/lib/libssl/t1_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: t1_lib.c,v 1.119 2017/07/19 17:45:31 jsing Exp $ */ | 1 | /* $OpenBSD: t1_lib.c,v 1.120 2017/07/23 16:27:44 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -1555,6 +1555,7 @@ ssl_parse_serverhello_tlsext(SSL *s, unsigned char **p, size_t n, int *al) | |||
1555 | unsigned char *end = *p + n; | 1555 | unsigned char *end = *p + n; |
1556 | int tlsext_servername = 0; | 1556 | int tlsext_servername = 0; |
1557 | int renegotiate_seen = 0; | 1557 | int renegotiate_seen = 0; |
1558 | CBS cbs; | ||
1558 | 1559 | ||
1559 | S3I(s)->next_proto_neg_seen = 0; | 1560 | S3I(s)->next_proto_neg_seen = 0; |
1560 | free(S3I(s)->alpn_selected); | 1561 | free(S3I(s)->alpn_selected); |
@@ -1581,6 +1582,10 @@ ssl_parse_serverhello_tlsext(SSL *s, unsigned char **p, size_t n, int *al) | |||
1581 | s->internal->tlsext_debug_cb(s, 1, type, data, size, | 1582 | s->internal->tlsext_debug_cb(s, 1, type, data, size, |
1582 | s->internal->tlsext_debug_arg); | 1583 | s->internal->tlsext_debug_arg); |
1583 | 1584 | ||
1585 | CBS_init(&cbs, data, size); | ||
1586 | if (!tlsext_serverhello_parse_one(s, &cbs, type, al)) | ||
1587 | return 0; | ||
1588 | |||
1584 | if (type == TLSEXT_TYPE_server_name) { | 1589 | if (type == TLSEXT_TYPE_server_name) { |
1585 | if (s->tlsext_hostname == NULL || size > 0) { | 1590 | if (s->tlsext_hostname == NULL || size > 0) { |
1586 | *al = TLS1_AD_UNRECOGNIZED_NAME; | 1591 | *al = TLS1_AD_UNRECOGNIZED_NAME; |