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>
This commit is contained in:
parent
193e366a3f
commit
2fb9cbd9ad
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue