From eb1a63f3bcd30e8e844f2a72ac9c3e7a82871638 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Wed, 8 Feb 2017 02:04:18 +0100 Subject: TLS13: add Key Update dissection Actual decryption support will be added later. Ping-Bug: 12779 Change-Id: I3ff1f243fd0bd1467e84d8a6a5433c1fe71bbebf Reviewed-on: https://code.wireshark.org/review/20012 Petri-Dish: Peter Wu Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu --- epan/dissectors/packet-ssl-utils.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 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 822b8bffce..1bcd0b2113 100644 --- a/epan/dissectors/packet-ssl-utils.c +++ b/epan/dissectors/packet-ssl-utils.c @@ -569,6 +569,7 @@ const value_string ssl_31_handshake_type[] = { { SSL_HND_CERT_URL, "Client Certificate URL" }, { SSL_HND_CERT_STATUS, "Certificate Status" }, { SSL_HND_SUPPLEMENTAL_DATA, "Supplemental Data" }, + { SSL_HND_KEY_UPDATE, "Key Update" }, { SSL_HND_ENCRYPTED_EXTS, "Encrypted Extensions" }, { 0x00, NULL } }; @@ -1205,6 +1206,12 @@ const value_string tls_hello_ext_psk_ke_mode[] = { { 0, NULL } }; +const value_string tls13_key_update_request[] = { + { 0, "update_not_requested" }, + { 1, "update_requested" }, + { 0, NULL } +}; + /* RFC 5246 7.4.1.4.1 */ const value_string tls_hash_algorithm[] = { { 0, "None" }, @@ -6630,6 +6637,7 @@ ssl_is_valid_handshake_type(guint8 hs_type, gboolean is_dtls) case SSL_HND_CERT_URL: case SSL_HND_CERT_STATUS: case SSL_HND_SUPPLEMENTAL_DATA: + case SSL_HND_KEY_UPDATE: case SSL_HND_ENCRYPTED_EXTS: return TRUE; } @@ -8063,6 +8071,22 @@ ssl_dissect_hnd_srv_keyex(ssl_common_dissect_t *hf, tvbuff_t *tvb, } /* Client Key Exchange and Server Key Exchange handshake dissections. }}} */ +void +tls13_dissect_hnd_key_update(ssl_common_dissect_t *hf, tvbuff_t *tvb, + proto_tree *tree, guint32 offset) +{ + /* https://tools.ietf.org/html/draft-ietf-tls-tls13-18#section-4.5.3 + * enum { + * update_not_requested(0), update_requested(1), (255) + * } KeyUpdateRequest; + * + * struct { + * KeyUpdateRequest request_update; + * } KeyUpdate; + */ + proto_tree_add_item(tree, hf->hf.hs_key_update_request_update, tvb, offset, 1, ENC_NA); +} + #ifdef HAVE_LIBGCRYPT void ssl_common_register_options(module_t *module, ssl_common_options_t *options) -- cgit v1.2.1