summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-ssl-utils.c
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2017-02-08 02:04:18 +0100
committerPeter Wu <peter@lekensteyn.nl>2017-02-11 13:22:43 +0000
commiteb1a63f3bcd30e8e844f2a72ac9c3e7a82871638 (patch)
tree3df30864bcd8a421e4b04afe41906560b0f69614 /epan/dissectors/packet-ssl-utils.c
parent746bbe7abf4bad74b78db0282d8962eb891eb502 (diff)
downloadwireshark-eb1a63f3bcd30e8e844f2a72ac9c3e7a82871638.tar.gz
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 <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'epan/dissectors/packet-ssl-utils.c')
-rw-r--r--epan/dissectors/packet-ssl-utils.c24
1 files changed, 24 insertions, 0 deletions
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)