summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-ssl-utils.c
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2016-09-22 13:46:42 +0200
committerAnders Broman <a.broman58@gmail.com>2016-09-27 03:53:44 +0000
commitd39d272e8002ce4346d554e39bf1b5053df4a27e (patch)
tree4b611d4beb7397c3b2287682bbe996667c8512fe /epan/dissectors/packet-ssl-utils.c
parentb5eb01c1a5219f075897b1cc5bc8f1883262af3b (diff)
downloadwireshark-d39d272e8002ce4346d554e39bf1b5053df4a27e.tar.gz
TLS(1.3): Add Early Data (42) Hello extension
Bug:12779 Change-Id: I97470c6e6be6e3df707cf2f3634f2c1e9da26bc2 Reviewed-on: https://code.wireshark.org/review/17885 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-ssl-utils.c')
-rw-r--r--epan/dissectors/packet-ssl-utils.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/epan/dissectors/packet-ssl-utils.c b/epan/dissectors/packet-ssl-utils.c
index 1667590cda..15ffb0b403 100644
--- a/epan/dissectors/packet-ssl-utils.c
+++ b/epan/dissectors/packet-ssl-utils.c
@@ -5605,6 +5605,26 @@ ssl_dissect_hnd_hello_ext_pre_shared_key(ssl_common_dissect_t *hf, tvbuff_t *tvb
}
static gint
+ssl_dissect_hnd_hello_ext_early_data(ssl_common_dissect_t *hf, tvbuff_t *tvb,
+ proto_tree *tree, guint32 offset, guint32 ext_len _U_,
+ guint8 hnd_type)
+{
+
+ switch (hnd_type){
+ case SSL_HND_CLIENT_HELLO:
+ proto_tree_add_item(tree, hf->hf.hs_ext_early_data_obfuscated_ticket_age, tvb, offset, 4, ENC_BIG_ENDIAN);
+ offset += 4;
+ break;
+ case SSL_HND_SERVER_HELLO: /* empty extension_data */
+ break;
+ default: /* no default */
+ break;
+ }
+
+ return offset;
+}
+
+static gint
ssl_dissect_hnd_hello_ext_server_name(ssl_common_dissect_t *hf, tvbuff_t *tvb,
proto_tree *tree, guint32 offset, guint32 ext_len)
{
@@ -6723,6 +6743,9 @@ ssl_dissect_hnd_hello_ext(ssl_common_dissect_t *hf, tvbuff_t *tvb, proto_tree *t
case SSL_HND_HELLO_EXT_PRE_SHARED_KEY:
offset = ssl_dissect_hnd_hello_ext_pre_shared_key(hf, tvb, ext_tree, offset, ext_len, hnd_type);
break;
+ case SSL_HND_HELLO_EXT_EARLY_DATA:
+ offset = ssl_dissect_hnd_hello_ext_early_data(hf, tvb, ext_tree, offset, ext_len, hnd_type);
+ break;
case SSL_HND_HELLO_EXT_DRAFT_VERSION_TLS13:
proto_tree_add_item(ext_tree, hf->hf.hs_ext_draft_version_tls13,
tvb, offset, 2, ENC_BIG_ENDIAN);