forked from osmocom/wireshark
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>
This commit is contained in:
parent
b5eb01c1a5
commit
d39d272e80
|
@ -5604,6 +5604,26 @@ ssl_dissect_hnd_hello_ext_pre_shared_key(ssl_common_dissect_t *hf, tvbuff_t *tvb
|
|||
return offset;
|
||||
}
|
||||
|
||||
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);
|
||||
|
|
|
@ -680,6 +680,7 @@ typedef struct ssl_common_dissect {
|
|||
gint hs_ext_psk_identity_length;
|
||||
gint hs_ext_psk_identity;
|
||||
gint hs_ext_psk_identity_selected;
|
||||
gint hs_ext_early_data_obfuscated_ticket_age;
|
||||
gint hs_ext_server_name;
|
||||
gint hs_ext_server_name_len;
|
||||
gint hs_ext_server_name_list_len;
|
||||
|
@ -878,6 +879,7 @@ ssl_common_dissect_t name = { \
|
|||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, \
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, \
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, \
|
||||
-1, \
|
||||
}, \
|
||||
/* ett */ { \
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, \
|
||||
|
@ -1041,6 +1043,11 @@ ssl_common_dissect_t name = { \
|
|||
FT_UINT16, BASE_DEC, NULL, 0x0, \
|
||||
NULL, HFILL } \
|
||||
}, \
|
||||
{ & name .hf.hs_ext_early_data_obfuscated_ticket_age, \
|
||||
{ "Obfuscated ticket age", prefix ".handshake.extensions.early_data.obfuscated_ticket_age", \
|
||||
FT_UINT32, BASE_DEC, NULL, 0x0, \
|
||||
"The time since the client learned about the server configuration that it is using, in milliseconds", HFILL } \
|
||||
}, \
|
||||
{ & name .hf.hs_ext_server_name_list_len, \
|
||||
{ "Server Name list length", prefix ".handshake.extensions_server_name_list_len", \
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0, \
|
||||
|
|
Loading…
Reference in New Issue