aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2017-12-27 22:10:33 +0100
committerAnders Broman <a.broman58@gmail.com>2018-01-02 05:32:55 +0000
commit1a7d65d08557c2b1ad9a4a563fc4dc86ed1af269 (patch)
treecce7476fb3f4925d95f2047d0e005d026d005c3e /epan
parentc8c268626c3219bbb20c639b88f18656081869e2 (diff)
TLS(QUIC): update TransportParameter to draft-08
not longer negotiated version on Client Hello but on encrypted extensions Missing add new TransportParameterId (ack_delay_exponent and initial_max_stream_id_uni) Bug: 13881 Change-Id: I5d76662b8c7767c48fdec460e2249d49c6693f18 Reviewed-on: https://code.wireshark.org/review/25018 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-ssl-utils.c31
1 files changed, 21 insertions, 10 deletions
diff --git a/epan/dissectors/packet-ssl-utils.c b/epan/dissectors/packet-ssl-utils.c
index 0a1bfcdca3..9c24fb1681 100644
--- a/epan/dissectors/packet-ssl-utils.c
+++ b/epan/dissectors/packet-ssl-utils.c
@@ -6450,18 +6450,20 @@ ssl_dissect_hnd_hello_ext_quic_transport_parameters(ssl_common_dissect_t *hf, tv
proto_tree *tree, guint32 offset, guint32 offset_end,
guint8 hnd_type, SslDecryptSession *ssl _U_)
{
- guint32 quic_length, parameter_length, supported_versions_length, next_offset;
+ guint32 quic_length, parameter_length, supported_versions_length, next_offset, version;
- /* https://tools.ietf.org/html/draft-ietf-quic-transport-04#section-7.3
+ /* https://tools.ietf.org/html/draft-ietf-quic-transport-08#section-7.4
* uint32 QuicVersion;
* enum {
* initial_max_stream_data(0),
* initial_max_data(1),
- * initial_max_stream_id(2),
+ * initial_max_stream_id_bidi(2),
* idle_timeout(3),
* truncate_connection_id(4),
* max_packet_size(5),
* stateless_reset_token(6),
+ * ack_delay_exponent(7),
+ * initial_max_stream_id_uni(8),
* (65535)
* } TransportParameterId;
*
@@ -6473,28 +6475,37 @@ ssl_dissect_hnd_hello_ext_quic_transport_parameters(ssl_common_dissect_t *hf, tv
* struct {
* select (Handshake.msg_type) {
* case client_hello:
- * QuicVersion negotiated_version;
* QuicVersion initial_version;
*
* case encrypted_extensions:
- * QuicVersion supported_versions<2..2^8-4>;
+ * QuicVersion negotiated_version;
+ * QuicVersion supported_versions<4..2^8-4>;
* };
* TransportParameter parameters<30..2^16-1>;
* } TransportParameters;
*/
switch (hnd_type) {
case SSL_HND_CLIENT_HELLO:
- proto_tree_add_item(tree, hf->hf.hs_ext_quictp_negotiated_version,
- tvb, offset, 4, ENC_BIG_ENDIAN);
- offset += 4;
+ version = tvb_get_ntohl(tvb, offset);
+ if(version <= 0xff000007){ /* No longer negotiated_version on Client Hello with >= draft-07 */
+ proto_tree_add_item(tree, hf->hf.hs_ext_quictp_negotiated_version,
+ tvb, offset, 4, ENC_BIG_ENDIAN);
+ offset += 4;
+ }
proto_tree_add_item(tree, hf->hf.hs_ext_quictp_initial_version,
tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
break;
case SSL_HND_ENCRYPTED_EXTENSIONS:
- /* QuicVersion supported_versions<2..2^8-4>;*/
+ version = tvb_get_ntohl(tvb, offset);
+ if(version > 0xff000007){ /* Now negotiated_version on Encrypted Extensions (>= draft-08) */
+ proto_tree_add_item(tree, hf->hf.hs_ext_quictp_negotiated_version,
+ tvb, offset, 4, ENC_BIG_ENDIAN);
+ offset += 4;
+ }
+ /* QuicVersion supported_versions<4..2^8-4>;*/
if (!ssl_add_vector(hf, tvb, pinfo, tree, offset, offset_end, &supported_versions_length,
- hf->hf.hs_ext_quictp_supported_versions_len, 2, G_MAXUINT8-3)) {
+ hf->hf.hs_ext_quictp_supported_versions_len, 4, G_MAXUINT8-3)) {
return offset_end;
}
offset += 1;