diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2016-08-23 13:38:27 +0200 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-09-11 04:32:27 +0000 |
commit | 2fb9cbd9adae558276ff68d4d819566246f4e3f5 (patch) | |
tree | 665a1c782abb73dfbcfeb799e27eea21a5be3e7c /epan/dissectors/packet-ssl-utils.c | |
parent | 193e366a3f54ba08a16322add7da0a4089210897 (diff) | |
download | wireshark-2fb9cbd9adae558276ff68d4d819566246f4e3f5.tar.gz |
TLS: Enhance display of Hello Extension
Append the length to the extension and display the contents of
unknown extensions as bytes.
Change-Id: Iba1204a1d5e187f28cb41c4369b10eeb86e6b43a
Reviewed-on: https://code.wireshark.org/review/17265
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-ssl-utils.c')
-rw-r--r-- | epan/dissectors/packet-ssl-utils.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/epan/dissectors/packet-ssl-utils.c b/epan/dissectors/packet-ssl-utils.c index f5671073bc..5f948615a8 100644 --- a/epan/dissectors/packet-ssl-utils.c +++ b/epan/dissectors/packet-ssl-utils.c @@ -6429,9 +6429,9 @@ ssl_dissect_hnd_hello_ext(ssl_common_dissect_t *hf, tvbuff_t *tvb, proto_tree *t ext_len = tvb_get_ntohs(tvb, offset + 2); ext_tree = proto_tree_add_subtree_format(tree, tvb, offset, 4 + ext_len, hf->ett.hs_ext, NULL, - "Extension: %s", val_to_str(ext_type, + "Extension: %s (len=%u)", val_to_str(ext_type, tls_hello_extension_types, - "Unknown %u")); + "Unknown type %u"), ext_len); proto_tree_add_uint(ext_tree, hf->hf.hs_ext_type, tvb, offset, 2, ext_type); @@ -6499,10 +6499,8 @@ ssl_dissect_hnd_hello_ext(ssl_common_dissect_t *hf, tvbuff_t *tvb, proto_tree *t ssl->state |= (is_client ? SSL_CLIENT_EXTENDED_MASTER_SECRET : SSL_SERVER_EXTENDED_MASTER_SECRET); break; default: - proto_tree_add_bytes_format(ext_tree, hf->hf.hs_ext_data, - tvb, offset, ext_len, NULL, - "Data (%u byte%s)", - ext_len, plurality(ext_len, "", "s")); + proto_tree_add_item(ext_tree, hf->hf.hs_ext_data, + tvb, offset, ext_len, ENC_NA); offset += ext_len; break; } |