From a8e7e3cc816b1cbec29f29113eb469ab9a8aa19d Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Fri, 17 Mar 2017 14:48:15 +0100 Subject: TLS13: add certificate_authorities (47) dissection for draft -19 Ping-Bug: 12779 Change-Id: Ic21869f73ffa1ac29b6a50102030eca85f533d37 Reviewed-on: https://code.wireshark.org/review/20589 Reviewed-by: Alexis La Goutte Petri-Dish: Alexis La Goutte Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- epan/dissectors/packet-ssl-utils.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'epan/dissectors/packet-ssl-utils.c') diff --git a/epan/dissectors/packet-ssl-utils.c b/epan/dissectors/packet-ssl-utils.c index 5c1c2307e7..55fc59a77f 100644 --- a/epan/dissectors/packet-ssl-utils.c +++ b/epan/dissectors/packet-ssl-utils.c @@ -1185,6 +1185,7 @@ const value_string tls_hello_extension_types[] = { { SSL_HND_HELLO_EXT_SUPPORTED_VERSIONS, "supported_versions" }, /* TLS 1.3 https://tools.ietf.org/html/draft-ietf-tls-tls13 */ { SSL_HND_HELLO_EXT_COOKIE, "cookie" }, /* TLS 1.3 https://tools.ietf.org/html/draft-ietf-tls-tls13 */ { SSL_HND_HELLO_EXT_PSK_KEY_EXCHANGE_MODES, "psk_key_exchange_modes" }, /* TLS 1.3 https://tools.ietf.org/html/draft-ietf-tls-tls13 */ + { SSL_HND_HELLO_EXT_CERTIFICATE_AUTHORITIES, "certificate_authorities" }, /* https://tools.ietf.org/html/draft-ietf-tls-tls13-19#section-4.2.3.1 */ { SSL_HND_HELLO_EXT_NPN, "next_protocol_negotiation"}, /* https://tools.ietf.org/id/draft-agl-tls-nextprotoneg-03.html */ { SSL_HND_HELLO_EXT_CHANNEL_ID_OLD, "channel_id_old" }, /* http://tools.ietf.org/html/draft-balfanz-tls-channelid-00 https://twitter.com/ericlaw/status/274237352531083264 */ @@ -6320,6 +6321,19 @@ ssl_dissect_hnd_hello_ext_psk_key_exchange_modes(ssl_common_dissect_t *hf, tvbuf return offset; } +static guint32 +ssl_dissect_hnd_hello_ext_certificate_authorities(ssl_common_dissect_t *hf, tvbuff_t *tvb, packet_info *pinfo, + proto_tree *tree, guint32 offset, guint32 offset_end) +{ + /* https://tools.ietf.org/html/draft-ietf-tls-tls13-19#section-4.2.3.1 + * opaque DistinguishedName<1..2^16-1>; + * struct { + * DistinguishedName authorities<3..2^16-1>; + * } CertificateAuthoritiesExtension; + */ + return tls_dissect_certificate_authorities(hf, tvb, pinfo, tree, offset, offset_end); +} + static gint ssl_dissect_hnd_hello_ext_server_name(ssl_common_dissect_t *hf, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, @@ -7788,6 +7802,9 @@ ssl_dissect_hnd_extension(ssl_common_dissect_t *hf, tvbuff_t *tvb, proto_tree *t case SSL_HND_HELLO_EXT_PSK_KEY_EXCHANGE_MODES: offset = ssl_dissect_hnd_hello_ext_psk_key_exchange_modes(hf, tvb, pinfo, ext_tree, offset, next_offset); break; + case SSL_HND_HELLO_EXT_CERTIFICATE_AUTHORITIES: + offset = ssl_dissect_hnd_hello_ext_certificate_authorities(hf, tvb, pinfo, ext_tree, offset, next_offset); + break; case SSL_HND_HELLO_EXT_NPN: offset = ssl_dissect_hnd_hello_ext_npn(hf, tvb, pinfo, ext_tree, offset, next_offset); break; -- cgit v1.2.1