summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-ssl-utils.c
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2017-02-08 00:48:28 +0100
committerPeter Wu <peter@lekensteyn.nl>2017-02-11 00:10:14 +0000
commitb659c76c320de2d66c369f88d400a98aeb56d2d7 (patch)
tree7b8c4517e65c0b6e6bd8653d5957e9c02e84dcef /epan/dissectors/packet-ssl-utils.c
parent813625883c109cd0fce3257872faa4a87dcfae55 (diff)
downloadwireshark-b659c76c320de2d66c369f88d400a98aeb56d2d7.tar.gz
TLS13: fix length of Finished message
Select the full message instead of just the first 12 bytes (as was the case in previous TLS versions. No check is added since it is too much work for little gain (it would require looking up the hash length for the cipher suite). Change-Id: Iea13d5abe6a7e55b04fabacfa8919a02acd8517d Reviewed-on: https://code.wireshark.org/review/20011 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.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/epan/dissectors/packet-ssl-utils.c b/epan/dissectors/packet-ssl-utils.c
index 86d23ca9e9..94cd19f53f 100644
--- a/epan/dissectors/packet-ssl-utils.c
+++ b/epan/dissectors/packet-ssl-utils.c
@@ -7340,7 +7340,7 @@ ssl_dissect_hnd_cli_cert_verify(ssl_common_dissect_t *hf, tvbuff_t *tvb,
/* Finished dissection. {{{ */
void
ssl_dissect_hnd_finished(ssl_common_dissect_t *hf, tvbuff_t *tvb,
- proto_tree *tree, guint32 offset,
+ proto_tree *tree, guint32 offset, guint32 offset_end,
const SslSession *session, ssl_hfs_t *ssl_hfs)
{
/* For SSLv3:
@@ -7353,6 +7353,11 @@ ssl_dissect_hnd_finished(ssl_common_dissect_t *hf, tvbuff_t *tvb,
* struct {
* opaque verify_data[12];
* } Finished;
+ *
+ * For TLS 1.3:
+ * struct {
+ * opaque verify_data[Hash.length];
+ * }
*/
if (!tree)
return;
@@ -7365,8 +7370,9 @@ ssl_dissect_hnd_finished(ssl_common_dissect_t *hf, tvbuff_t *tvb,
tvb, offset + 16, 20, ENC_NA);
}
} else {
+ /* Length should be 12 for TLS before 1.3, assume this is the case. */
proto_tree_add_item(tree, hf->hf.hs_finished,
- tvb, offset, 12, ENC_NA);
+ tvb, offset, offset_end - offset, ENC_NA);
}
} /* }}} */