Wireshark 5.1.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
packet-tls-utils.h
1/* packet-tls-utils.h
2 * ssl manipulation functions
3 * By Paolo Abeni <paolo.abeni@email.com>
4 *
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
8 *
9 * SPDX-License-Identifier: GPL-2.0-or-later
10 */
11
12#ifndef __PACKET_TLS_UTILS_H__
13#define __PACKET_TLS_UTILS_H__
14
15#include <stdio.h> /* some APIs we declare take a stdio stream as an argument */
16
17#include <glib.h>
18#include <epan/packet.h>
19#include <epan/prefs.h>
20#include <epan/wmem_scopes.h>
21#include <epan/expert.h>
22#include <epan/conversation.h>
23#include <epan/tap.h>
24#include <epan/unit_strings.h>
25#include <wsutil/wsgcrypt.h>
26
27/* TODO inline this now that Libgcrypt is mandatory? */
28#define SSL_CIPHER_CTX gcry_cipher_hd_t
29#define SSL_DECRYPT_DEBUG
30
31
32/* other defines */
33typedef enum {
34 SSL_ID_CHG_CIPHER_SPEC = 0x14,
35 SSL_ID_ALERT = 0x15,
36 SSL_ID_HANDSHAKE = 0x16,
37 SSL_ID_APP_DATA = 0x17,
38 SSL_ID_HEARTBEAT = 0x18,
39 SSL_ID_TLS12_CID = 0x19,
40 SSL_ID_DTLS13_ACK = 0x1A,
41} ContentType;
42
43typedef enum {
44 SSL_HND_HELLO_REQUEST = 0,
45 SSL_HND_CLIENT_HELLO = 1,
46 SSL_HND_SERVER_HELLO = 2,
47 SSL_HND_HELLO_VERIFY_REQUEST = 3,
48 SSL_HND_NEWSESSION_TICKET = 4,
49 SSL_HND_END_OF_EARLY_DATA = 5,
50 SSL_HND_HELLO_RETRY_REQUEST = 6,
51 SSL_HND_ENCRYPTED_EXTENSIONS = 8,
52 SSL_HND_CERTIFICATE = 11,
53 SSL_HND_SERVER_KEY_EXCHG = 12,
54 SSL_HND_CERT_REQUEST = 13,
55 SSL_HND_SVR_HELLO_DONE = 14,
56 SSL_HND_CERT_VERIFY = 15,
57 SSL_HND_CLIENT_KEY_EXCHG = 16,
58 SSL_HND_FINISHED = 20,
59 SSL_HND_CERT_URL = 21,
60 SSL_HND_CERT_STATUS = 22,
61 SSL_HND_SUPPLEMENTAL_DATA = 23,
62 SSL_HND_KEY_UPDATE = 24,
63 SSL_HND_COMPRESSED_CERTIFICATE = 25,
64 /* Encrypted Extensions was NextProtocol in draft-agl-tls-nextprotoneg-03
65 * and changed in draft 04. Not to be confused with TLS 1.3 EE. */
66 SSL_HND_ENCRYPTED_EXTS = 67,
67 SSL_HND_MESSAGE_HASH = 254
68} HandshakeType;
69
70#define SSL2_HND_ERROR 0x00
71#define SSL2_HND_CLIENT_HELLO 0x01
72#define SSL2_HND_CLIENT_MASTER_KEY 0x02
73#define SSL2_HND_CLIENT_FINISHED 0x03
74#define SSL2_HND_SERVER_HELLO 0x04
75#define SSL2_HND_SERVER_VERIFY 0x05
76#define SSL2_HND_SERVER_FINISHED 0x06
77#define SSL2_HND_REQUEST_CERTIFICATE 0x07
78#define SSL2_HND_CLIENT_CERTIFICATE 0x08
79
80#define SSL_HND_HELLO_EXT_SERVER_NAME 0
81#define SSL_HND_HELLO_EXT_MAX_FRAGMENT_LENGTH 1
82#define SSL_HND_HELLO_EXT_CLIENT_CERTIFICATE_URL 2
83#define SSL_HND_HELLO_EXT_TRUSTED_CA_KEYS 3
84#define SSL_HND_HELLO_EXT_TRUNCATED_HMAC 4
85#define SSL_HND_HELLO_EXT_STATUS_REQUEST 5
86#define SSL_HND_HELLO_EXT_USER_MAPPING 6
87#define SSL_HND_HELLO_EXT_CLIENT_AUTHZ 7
88#define SSL_HND_HELLO_EXT_SERVER_AUTHZ 8
89#define SSL_HND_HELLO_EXT_CERT_TYPE 9
90#define SSL_HND_HELLO_EXT_SUPPORTED_GROUPS 10 /* renamed from "elliptic_curves" (RFC 7919 / TLS 1.3) */
91#define SSL_HND_HELLO_EXT_EC_POINT_FORMATS 11
92#define SSL_HND_HELLO_EXT_SRP 12
93#define SSL_HND_HELLO_EXT_SIGNATURE_ALGORITHMS 13
94#define SSL_HND_HELLO_EXT_USE_SRTP 14
95#define SSL_HND_HELLO_EXT_HEARTBEAT 15
96#define SSL_HND_HELLO_EXT_ALPN 16
97#define SSL_HND_HELLO_EXT_STATUS_REQUEST_V2 17
98#define SSL_HND_HELLO_EXT_SIGNED_CERTIFICATE_TIMESTAMP 18
99#define SSL_HND_HELLO_EXT_CLIENT_CERT_TYPE 19
100#define SSL_HND_HELLO_EXT_SERVER_CERT_TYPE 20
101#define SSL_HND_HELLO_EXT_PADDING 21
102#define SSL_HND_HELLO_EXT_ENCRYPT_THEN_MAC 22
103#define SSL_HND_HELLO_EXT_EXTENDED_MASTER_SECRET 23
104#define SSL_HND_HELLO_EXT_TOKEN_BINDING 24
105#define SSL_HND_HELLO_EXT_CACHED_INFO 25
106#define SSL_HND_HELLO_EXT_COMPRESS_CERTIFICATE 27
107#define SSL_HND_HELLO_EXT_RECORD_SIZE_LIMIT 28
108/* 26-33 Unassigned*/
109#define SSL_HND_HELLO_EXT_DELEGATED_CREDENTIALS 34 /* draft-ietf-tls-subcerts-10.txt */
110#define SSL_HND_HELLO_EXT_SESSION_TICKET_TLS 35
111/* RFC 8446 (TLS 1.3) */
112#define SSL_HND_HELLO_EXT_KEY_SHARE_OLD 40 /* draft-ietf-tls-tls13-22 (removed in -23) */
113#define SSL_HND_HELLO_EXT_PRE_SHARED_KEY 41
114#define SSL_HND_HELLO_EXT_EARLY_DATA 42
115#define SSL_HND_HELLO_EXT_SUPPORTED_VERSIONS 43
116#define SSL_HND_HELLO_EXT_COOKIE 44
117#define SSL_HND_HELLO_EXT_PSK_KEY_EXCHANGE_MODES 45
118#define SSL_HND_HELLO_EXT_TICKET_EARLY_DATA_INFO 46 /* draft-ietf-tls-tls13-18 (removed in -19) */
119#define SSL_HND_HELLO_EXT_CERTIFICATE_AUTHORITIES 47
120#define SSL_HND_HELLO_EXT_OID_FILTERS 48
121#define SSL_HND_HELLO_EXT_POST_HANDSHAKE_AUTH 49
122#define SSL_HND_HELLO_EXT_SIGNATURE_ALGORITHMS_CERT 50
123#define SSL_HND_HELLO_EXT_KEY_SHARE 51
124#define SSL_HND_HELLO_EXT_TRANSPARENCY_INFO 52 /* draft-ietf-trans-rfc6962-bis-41 */
125#define SSL_HND_HELLO_EXT_CONNECTION_ID_DEPRECATED 53 /* draft-ietf-tls-dtls-connection-id-07 */
126#define SSL_HND_HELLO_EXT_CONNECTION_ID 54
127#define SSL_HND_HELLO_EXT_EXTERNAL_ID_HASH 55 /* RFC 8844 */
128#define SSL_HND_HELLO_EXT_EXTERNAL_SESSION_ID 56 /* RFC 8844 */
129#define SSL_HND_HELLO_EXT_QUIC_TRANSPORT_PARAMETERS_V1 57 /* draft-ietf-quic-tls-33 */
130#define SSL_HND_HELLO_EXT_TICKET_REQUEST 58 /* draft-ietf-tls-ticketrequests-07 */
131#define SSL_HND_HELLO_EXT_DNSSEC_CHAIN 59 /* RFC 9102 */
132#define SSL_HND_HELLO_EXT_GREASE_0A0A 2570
133#define SSL_HND_HELLO_EXT_GREASE_1A1A 6682
134#define SSL_HND_HELLO_EXT_GREASE_2A2A 10794
135#define SSL_HND_HELLO_EXT_NPN 13172 /* 0x3374 */
136#define SSL_HND_HELLO_EXT_GREASE_3A3A 14906
137#define SSL_HND_HELLO_EXT_ALPS_OLD 17513 /* draft-vvv-tls-alps-01, previous value used in BoringSSL implementation */
138#define SSL_HND_HELLO_EXT_ALPS 17613 /* draft-vvv-tls-alps-01, current value used in BoringSSL implementation */
139#define SSL_HND_HELLO_EXT_GREASE_4A4A 19018
140#define SSL_HND_HELLO_EXT_GREASE_5A5A 23130
141#define SSL_HND_HELLO_EXT_GREASE_6A6A 27242
142#define SSL_HND_HELLO_EXT_CHANNEL_ID_OLD 30031 /* 0x754f */
143#define SSL_HND_HELLO_EXT_CHANNEL_ID 30032 /* 0x7550 */
144#define SSL_HND_HELLO_EXT_GREASE_7A7A 31354
145#define SSL_HND_HELLO_EXT_GREASE_8A8A 35466
146#define SSL_HND_HELLO_EXT_GREASE_9A9A 39578
147#define SSL_HND_HELLO_EXT_GREASE_AAAA 43690
148#define SSL_HND_HELLO_EXT_GREASE_BABA 47802
149#define SSL_HND_HELLO_EXT_GREASE_CACA 51914
150#define SSL_HND_HELLO_EXT_GREASE_DADA 56026
151#define SSL_HND_HELLO_EXT_GREASE_EAEA 60138
152#define SSL_HND_HELLO_EXT_GREASE_FAFA 64250
153#define SSL_HND_HELLO_EXT_ECH_OUTER_EXTENSIONS 64768 /* 0xfd00 draft-ietf-tls-esni-16 */
154#define SSL_HND_HELLO_EXT_ENCRYPTED_CLIENT_HELLO 65037 /* 0xfe0d draft-ietf-tls-esni-16 */
155#define SSL_HND_HELLO_EXT_RENEGOTIATION_INFO 65281 /* 0xFF01 */
156#define SSL_HND_HELLO_EXT_QUIC_TRANSPORT_PARAMETERS 65445 /* 0xffa5 draft-ietf-quic-tls-13 */
157#define SSL_HND_HELLO_EXT_ENCRYPTED_SERVER_NAME 65486 /* 0xffce draft-ietf-tls-esni-01 */
158
159#define SSL_HND_CERT_URL_TYPE_INDIVIDUAL_CERT 1
160#define SSL_HND_CERT_URL_TYPE_PKIPATH 2
161#define SSL_HND_CERT_STATUS_TYPE_OCSP 1
162#define SSL_HND_CERT_STATUS_TYPE_OCSP_MULTI 2
163#define SSL_HND_CERT_TYPE_RAW_PUBLIC_KEY 2
164
165/* https://github.com/quicwg/base-drafts/wiki/Temporary-IANA-Registry#quic-transport-parameters */
166#define SSL_HND_QUIC_TP_ORIGINAL_DESTINATION_CONNECTION_ID 0x00
167#define SSL_HND_QUIC_TP_MAX_IDLE_TIMEOUT 0x01
168#define SSL_HND_QUIC_TP_STATELESS_RESET_TOKEN 0x02
169#define SSL_HND_QUIC_TP_MAX_UDP_PAYLOAD_SIZE 0x03
170#define SSL_HND_QUIC_TP_INITIAL_MAX_DATA 0x04
171#define SSL_HND_QUIC_TP_INITIAL_MAX_STREAM_DATA_BIDI_LOCAL 0x05
172#define SSL_HND_QUIC_TP_INITIAL_MAX_STREAM_DATA_BIDI_REMOTE 0x06
173#define SSL_HND_QUIC_TP_INITIAL_MAX_STREAM_DATA_UNI 0x07
174#define SSL_HND_QUIC_TP_INITIAL_MAX_STREAMS_BIDI 0x08
175#define SSL_HND_QUIC_TP_INITIAL_MAX_STREAMS_UNI 0x09
176#define SSL_HND_QUIC_TP_ACK_DELAY_EXPONENT 0x0a
177#define SSL_HND_QUIC_TP_MAX_ACK_DELAY 0x0b
178#define SSL_HND_QUIC_TP_DISABLE_ACTIVE_MIGRATION 0x0c
179#define SSL_HND_QUIC_TP_PREFERRED_ADDRESS 0x0d
180#define SSL_HND_QUIC_TP_ACTIVE_CONNECTION_ID_LIMIT 0x0e
181#define SSL_HND_QUIC_TP_INITIAL_SOURCE_CONNECTION_ID 0x0f
182#define SSL_HND_QUIC_TP_RETRY_SOURCE_CONNECTION_ID 0x10
183#define SSL_HND_QUIC_TP_VERSION_INFORMATION 0x11 /* https://tools.ietf.org/html/draft-ietf-quic-version-negotiation-14 */
184#define SSL_HND_QUIC_TP_MAX_DATAGRAM_FRAME_SIZE 0x20 /* https://datatracker.ietf.org/doc/html/draft-ietf-quic-datagram-06 */
185#define SSL_HND_QUIC_TP_CIBIR_ENCODING 0x1000 /* https://datatracker.ietf.org/doc/html/draft-banks-quic-cibir-01 */
186#define SSL_HND_QUIC_TP_LOSS_BITS 0x1057 /* https://tools.ietf.org/html/draft-ferrieuxhamchaoui-quic-lossbits-03 */
187#define SSL_HND_QUIC_TP_GREASE_QUIC_BIT 0x2ab2 /* RFC 9287 */
188#define SSL_HND_QUIC_TP_ENABLE_TIME_STAMP 0x7157 /* https://tools.ietf.org/html/draft-huitema-quic-ts-02 */
189#define SSL_HND_QUIC_TP_ENABLE_TIME_STAMP_V2 0x7158 /* https://tools.ietf.org/html/draft-huitema-quic-ts-03 */
190#define SSL_HND_QUIC_TP_MIN_ACK_DELAY_OLD 0xde1a /* https://tools.ietf.org/html/draft-iyengar-quic-delayed-ack-00 */
191/* https://quiche.googlesource.com/quiche/+/refs/heads/master/quic/core/crypto/transport_parameters.cc */
192#define SSL_HND_QUIC_TP_GOOGLE_USER_AGENT 0x3129
193#define SSL_HND_QUIC_TP_GOOGLE_KEY_UPDATE_NOT_YET_SUPPORTED 0x312B
194#define SSL_HND_QUIC_TP_GOOGLE_QUIC_VERSION 0x4752
195#define SSL_HND_QUIC_TP_GOOGLE_INITIAL_RTT 0x3127
196#define SSL_HND_QUIC_TP_GOOGLE_SUPPORT_HANDSHAKE_DONE 0x312A
197#define SSL_HND_QUIC_TP_GOOGLE_QUIC_PARAMS 0x4751
198#define SSL_HND_QUIC_TP_GOOGLE_CONNECTION_OPTIONS 0x3128
199/* https://github.com/facebookincubator/mvfst/blob/master/quic/QuicConstants.h */
200#define SSL_HND_QUIC_TP_FACEBOOK_PARTIAL_RELIABILITY 0xFF00
201#define SSL_HND_QUIC_TP_VERSION_INFORMATION_DRAFT 0xff73db /* https://datatracker.ietf.org/doc/draft-ietf-quic-version-negotiation/13/ */
202#define SSL_HND_QUIC_TP_ADDRESS_DISCOVERY 0x9f81a176 /* https://tools.ietf.org/html/draft-ietf-quic-address-discovery-00 */
203#define SSL_HND_QUIC_TP_MIN_ACK_DELAY_DRAFT_V1 0xFF03DE1A /* https://tools.ietf.org/html/draft-ietf-quic-ack-frequency-01 */
204#define SSL_HND_QUIC_TP_MIN_ACK_DELAY_DRAFT05 0xff04de1a /* https://tools.ietf.org/html/draft-ietf-quic-ack-frequency-04 / draft-05 */
205#define SSL_HND_QUIC_TP_MIN_ACK_DELAY 0xff04de1b /* https://tools.ietf.org/html/draft-ietf-quic-ack-frequency-07 */
206#define SSL_HND_QUIC_TP_ENABLE_MULTIPATH_DRAFT04 0x0f739bbc1b666d04 /* https://tools.ietf.org/html/draft-ietf-quic-multipath-04 */
207#define SSL_HND_QUIC_TP_ENABLE_MULTIPATH_DRAFT05 0x0f739bbc1b666d05 /* https://tools.ietf.org/html/draft-ietf-quic-multipath-05 */
208#define SSL_HND_QUIC_TP_ENABLE_MULTIPATH 0x0f739bbc1b666d06 /* https://tools.ietf.org/html/draft-ietf-quic-multipath-06 */
209#define SSL_HND_QUIC_TP_INITIAL_MAX_PATHS 0x0f739bbc1b666d07 /* https://tools.ietf.org/html/draft-ietf-quic-multipath-07 */
210#define SSL_HND_QUIC_TP_INITIAL_MAX_PATH_ID_DRAFT09 0x0f739bbc1b666d09 /* https://tools.ietf.org/html/draft-ietf-quic-multipath-09 */
211#define SSL_HND_QUIC_TP_INITIAL_MAX_PATH_ID_DRAFT11 0x0f739bbc1b666d11 /* https://tools.ietf.org/html/draft-ietf-quic-multipath-11 */
212#define SSL_HND_QUIC_TP_INITIAL_MAX_PATH_ID_DRAFT12 0x0f739bbc1b666d0c /* https://tools.ietf.org/html/draft-ietf-quic-multipath-12 */
213#define SSL_HND_QUIC_TP_INITIAL_MAX_PATH_ID_DRAFT13 0x0f739bbc1b666d0d /* https://tools.ietf.org/html/draft-ietf-quic-multipath-13 */
214#define SSL_HND_QUIC_TP_INITIAL_MAX_PATH_ID 0x3e /* https://tools.ietf.org/html/draft-ietf-quic-multipath-19 */
215
216/*
217 * Lookup tables
218 */
219extern const value_string ssl_version_short_names[];
220extern const value_string ssl_20_msg_types[];
221extern value_string_ext ssl_20_cipher_suites_ext;
222extern const value_string ssl_20_certificate_type[];
223extern const value_string ssl_31_content_type[];
224extern const value_string ssl_versions[];
225extern const value_string ssl_31_change_cipher_spec[];
226extern const value_string ssl_31_alert_level[];
227extern const value_string ssl_31_alert_description[];
228extern const value_string ssl_31_handshake_type[];
229extern const value_string tls_heartbeat_type[];
230extern const value_string tls_heartbeat_mode[];
231extern const value_string ssl_31_compression_method[];
232extern const value_string ssl_31_key_exchange_algorithm[];
233extern const value_string ssl_31_signature_algorithm[];
234extern const value_string ssl_31_client_certificate_type[];
235extern const value_string ssl_31_public_value_encoding[];
236extern value_string_ext ssl_31_ciphersuite_ext;
237extern const value_string tls_hello_extension_types[];
238extern const value_string tls_hash_algorithm[];
239extern const value_string tls_signature_algorithm[];
240extern const value_string tls13_signature_algorithm[];
241extern const value_string tls_certificate_type[];
242extern const value_string tls_cert_chain_type[];
243extern const value_string tls_cert_status_type[];
244extern const value_string ssl_extension_curves[];
245extern const value_string ssl_extension_ec_point_formats[];
246extern const value_string ssl_curve_types[];
247extern const value_string tls_hello_ext_server_name_type_vs[];
248extern const value_string tls_hello_ext_max_fragment_length[];
249extern const value_string tls_hello_ext_psk_ke_mode[];
250extern const value_string tls_hello_ext_trusted_ca_key_type[];
251extern const value_string tls13_key_update_request[];
252extern const value_string compress_certificate_algorithm_vals[];
253extern const val64_string quic_transport_parameter_id[];
254extern const range_string quic_version_vals[];
255extern const val64_string quic_address_discovery_vals[];
256extern const val64_string quic_enable_time_stamp_v2_vals[];
257extern const val64_string quic_enable_multipath_vals[];
258extern const value_string tls_hello_ext_ech_clienthello_types[];
259extern const value_string kem_id_type_vals[];
260extern const value_string kdf_id_type_vals[];
261extern const value_string aead_id_type_vals[];
262extern const value_string token_binding_key_parameter_vals[];
263
264/* XXX Should we use GByteArray instead? */
265typedef struct _StringInfo {
266 unsigned char *data; /* Backing storage which may be larger than data_len */
267 unsigned data_len; /* Length of the meaningful part of data */
268} StringInfo;
269
270#define SSL_WRITE_KEY 1
271
272#define SSL_VER_UNKNOWN 0
273#define SSLV2_VERSION 0x0002 /* not in record layer, SSL_CLIENT_SERVER from
274 http://www-archive.mozilla.org/projects/security/pki/nss/ssl/draft02.html */
275#define SSLV3_VERSION 0x300
276#define TLSV1_VERSION 0x301
277#define TLCPV1_VERSION 0x101
278#define TLSV1DOT1_VERSION 0x302
279#define TLSV1DOT2_VERSION 0x303
280#define TLSV1DOT3_VERSION 0x304
281#define DTLSV1DOT0_VERSION 0xfeff
282#define DTLSV1DOT0_OPENSSL_VERSION 0x100
283#define DTLSV1DOT2_VERSION 0xfefd
284#define DTLSV1DOT3_VERSION 0xfefc
285
286/* Returns the TLS 1.3 draft version or 0 if not applicable. */
287static inline uint8_t extract_tls13_draft_version(uint32_t version) {
288 if ((version & 0xff00) == 0x7f00) {
289 return (uint8_t) version;
290 }
291 return 0;
292}
293
294
295#define SSL_CLIENT_RANDOM (1<<0)
296#define SSL_SERVER_RANDOM (1<<1)
297#define SSL_CIPHER (1<<2)
298#define SSL_HAVE_SESSION_KEY (1<<3)
299#define SSL_VERSION (1<<4)
300#define SSL_MASTER_SECRET (1<<5)
301#define SSL_PRE_MASTER_SECRET (1<<6)
302#define SSL_CLIENT_EXTENDED_MASTER_SECRET (1<<7)
303#define SSL_SERVER_EXTENDED_MASTER_SECRET (1<<8)
304#define SSL_NEW_SESSION_TICKET (1<<10)
305#define SSL_ENCRYPT_THEN_MAC (1<<11)
306#define SSL_SEEN_0RTT_APPDATA (1<<12)
307#define SSL_QUIC_RECORD_LAYER (1<<13) /* For QUIC (draft >= -13) */
308#define SSL_HELLO_RETRY_REQUEST (1<<14)
309
310#define SSL_EXTENDED_MASTER_SECRET_MASK (SSL_CLIENT_EXTENDED_MASTER_SECRET|SSL_SERVER_EXTENDED_MASTER_SECRET)
311
312/* SSL Cipher Suite modes */
313typedef enum {
314 MODE_STREAM, /* GenericStreamCipher */
315 MODE_CBC, /* GenericBlockCipher */
316 MODE_GCM, /* GenericAEADCipher */
317 MODE_CCM, /* AEAD_AES_{128,256}_CCM with 16 byte auth tag */
318 MODE_CCM_8, /* AEAD_AES_{128,256}_CCM with 8 byte auth tag */
319 MODE_POLY1305, /* AEAD_CHACHA20_POLY1305 with 16 byte auth tag (RFC 7905) */
320 MODE_ECB, /* ECB: used to perform record seq number encryption in DTLSv1.3 */
321} ssl_cipher_mode_t;
322
323/* Explicit and implicit nonce length (RFC 5116 - Section 3.2.1) */
324#define IMPLICIT_NONCE_LEN 4
325#define EXPLICIT_NONCE_LEN 8
326#define TLS13_AEAD_NONCE_LENGTH 12
327
328/* TLS 1.3 Record type for selecting the appropriate secret. */
329typedef enum {
330 TLS_SECRET_0RTT_APP,
331 TLS_SECRET_HANDSHAKE,
332 TLS_SECRET_APP,
333} TLSRecordType;
334
335#define SSL_DEBUG_USE_STDERR "-"
336
337#define SSLV2_MAX_SESSION_ID_LENGTH_IN_BYTES 16
338
339/* Record fragment lengths MUST NOT exceed 2^14 (= 0x4000) */
340#define TLS_MAX_RECORD_LENGTH 0x4000
342typedef struct _SslCipherSuite {
343 int number;
344 int kex;
345 int enc;
346 int dig;
347 ssl_cipher_mode_t mode;
348} SslCipherSuite;
350typedef struct _SslFlow {
351 uint32_t byte_seq;
352 uint16_t flags;
353 wmem_tree_t *multisegment_pdus;
354} SslFlow;
355
356typedef struct _SslDecompress SslDecompress;
358typedef struct _SslDecoder {
359 const SslCipherSuite *cipher_suite;
360 int compression;
361 unsigned char _mac_key_or_write_iv[48];
362 StringInfo mac_key; /* for block and stream ciphers */
363 StringInfo write_iv; /* for AEAD ciphers (at least GCM, CCM) */
364 SSL_CIPHER_CTX sn_evp; /* used to decrypt serial number in DTLSv1.3 */
365 SSL_CIPHER_CTX evp;
366 SslDecompress *decomp;
367 uint64_t dtls13_epoch;
368 uint64_t seq;
369 StringInfo dtls13_aad;
370 uint16_t epoch;
371 SslFlow *flow;
372 StringInfo app_traffic_secret;
373} SslDecoder;
374
375#define KEX_DHE_DSS 0x10
376#define KEX_DHE_PSK 0x11
377#define KEX_DHE_RSA 0x12
378#define KEX_DH_ANON 0x13
379#define KEX_DH_DSS 0x14
380#define KEX_DH_RSA 0x15
381#define KEX_ECDHE_ECDSA 0x16
382#define KEX_ECDHE_PSK 0x17
383#define KEX_ECDHE_RSA 0x18
384#define KEX_ECDH_ANON 0x19
385#define KEX_ECDH_ECDSA 0x1a
386#define KEX_ECDH_RSA 0x1b
387#define KEX_KRB5 0x1c
388#define KEX_PSK 0x1d
389#define KEX_RSA 0x1e
390#define KEX_RSA_PSK 0x1f
391#define KEX_SRP_SHA 0x20
392#define KEX_SRP_SHA_DSS 0x21
393#define KEX_SRP_SHA_RSA 0x22
394#define KEX_IS_DH(n) ((n) >= KEX_DHE_DSS && (n) <= KEX_ECDH_RSA)
395#define KEX_TLS13 0x23
396#define KEX_ECJPAKE 0x24
397
398#define KEX_ECDHE_SM2 0x25
399#define KEX_ECC_SM2 0x26
400#define KEX_IBSDH_SM9 0x27
401#define KEX_IBC_SM9 0x28
402
403/* Order is significant, must match "ciphers" array in packet-tls-utils.c */
404
405#define ENC_START 0x30
406#define ENC_DES 0x30
407#define ENC_3DES 0x31
408#define ENC_RC4 0x32
409#define ENC_RC2 0x33
410#define ENC_IDEA 0x34
411#define ENC_AES 0x35
412#define ENC_AES256 0x36
413#define ENC_CAMELLIA128 0x37
414#define ENC_CAMELLIA256 0x38
415#define ENC_SEED 0x39
416#define ENC_CHACHA20 0x3A
417#define ENC_SM1 0x3B
418#define ENC_SM4 0x3C
419#define ENC_NULL 0x3D
420
421
422#define DIG_MD5 0x40
423#define DIG_SHA 0x41
424#define DIG_SHA256 0x42
425#define DIG_SHA384 0x43
426#define DIG_SM3 0x44
427#define DIG_NA 0x45 /* Not Applicable */
429typedef struct {
430 const char *name;
431 unsigned len;
434typedef struct _SslRecordInfo {
435 unsigned char *plain_data;
436 unsigned plain_data_len;
439 unsigned content_len;
441 int id;
443 ContentType type;
444 SslFlow *flow;
446 uint64_t record_seq;
447 uint32_t seq;
448 struct _SslRecordInfo* next;
449} SslRecordInfo;
450
454 */
455typedef struct _TlsHsFragment {
456 unsigned record_id;
458 unsigned reassembly_id;
459 uint32_t offset;
460 uint8_t type;
461 int is_last : 1;
462 struct _TlsHsFragment *next;
463} TlsHsFragment;
465typedef struct {
466 SslRecordInfo *records;
467 TlsHsFragment *hs_fragments;
468 uint32_t srcport;
469 uint32_t destport;
470 uint32_t stream;
471 int cipher;
475typedef struct _SslSession {
476 int cipher;
477 int compression;
478 uint16_t version;
479 unsigned char tls13_draft_version;
480 unsigned char _client_random[32];
481 int8_t client_cert_type;
482 int8_t server_cert_type;
483 uint32_t client_ccs_frame;
484 uint32_t server_ccs_frame;
485 bool cid_listed;
486 uint32_t first_ch_ech_frame;
487 StringInfo client_random;
488 bool ech;
489 bool hrr_ech_declined;
490 unsigned char ech_confirmation[8];
491 unsigned char hrr_ech_confirmation[8];
492 unsigned char first_ech_auth_tag[16];
493
494 /* The address/proto/port of the server as determined from heuristics
495 * (e.g. ClientHello) or set externally (via ssl_set_master_secret()). */
496 address srv_addr;
497 port_type srv_ptype;
498 unsigned srv_port;
499
500 uint32_t stream;
501
502 /* The Application layer protocol if known (for STARTTLS support) */
503 dissector_handle_t app_handle;
504 const char *alpn_name;
505 /* The ALPN the client requested, not necessarily the one chosen */
506 const char *client_alpn_name;
507 uint32_t last_nontls_frame;
508 bool is_session_resumed;
509
510 /* First pass only: track an in-progress handshake reassembly (>0) */
511 uint32_t client_hs_reassembly_id;
512 uint32_t server_hs_reassembly_id;
513
514 /* Connection ID extension
515
516 struct {
517 opaque cid<0..2^8-1>;
518 } ConnectionId;
519 */
520
521 uint8_t *client_cid;
522 uint8_t *server_cid;
523 uint8_t client_cid_len;
524 bool client_cid_len_present;
525 uint8_t server_cid_len;
526 bool server_cid_len_present;
527 bool deprecated_cid; /* Set when handshake is using the deprecated CID extension type */
528 uint64_t dtls13_current_epoch[2]; /* max epoch (for server and client respectively) */
529 uint64_t dtls13_next_seq_num[2]; /* DTLSv1.3 next expected seq number (for server and client respectively) */
530} SslSession;
531
532/* RFC 5246, section 8.1 says that the master secret is always 48 bytes */
533#define SSL_MASTER_SECRET_LENGTH 48
534
535struct cert_key_id; /* defined in epan/secrets.h */
536
537/* A handshake transcript, used for the Extended Master Secret (RFC 7627),
538 * the TLS 1.3 secrets when only a PSK is used, and the Encrypted Client
539 * Hello confirmation. The messages are buffered until the hash function is
540 * known (from the version and cipher suite in the ServerHello or
541 * HelloRetryRequest); after that, only the digest state is kept. */
542typedef struct _tls_transcript {
543 StringInfo buffer; /* allocated in file scope */
544 gcry_md_hd_t md; /* NULL until the hash function is known */
545 bool failed; /* the hash can't be calculated */
546} tls_transcript_t;
547
548/* This holds state information for a SSL conversation */
549typedef struct _SslDecryptSession {
550 unsigned char _master_secret[SSL_MASTER_SECRET_LENGTH];
551 unsigned char _session_id[256];
552 unsigned char _client_random[32];
553 unsigned char _server_random[32];
554 StringInfo session_id;
555 StringInfo session_ticket;
556 StringInfo server_random;
557 StringInfo client_random;
558 StringInfo master_secret;
559 tls_transcript_t handshake_transcript;
560 /* the data store for this StringInfo must be allocated explicitly with a capture lifetime scope */
561 StringInfo pre_master_secret;
562 unsigned char _server_data_for_iv[24];
563 StringInfo server_data_for_iv;
564 unsigned char _client_data_for_iv[24];
565 StringInfo client_data_for_iv;
566
567 int state;
568 const SslCipherSuite *cipher_suite;
569 SslDecoder *server;
570 SslDecoder *client;
571 SslDecoder *server_new;
572 SslDecoder *client_new;
573#if defined(HAVE_LIBGNUTLS)
574 struct cert_key_id *cert_key_id;
575#endif
576 StringInfo psk;
577 StringInfo app_data_segment;
578 SslSession session;
579 bool has_early_data;
580 bool has_psk;
581 bool has_key_share;
582 tls_transcript_t ech_transcript;
583 /* The random of the last ClientHello, used to tell whether a ClientHello
584 * after a HelloRetryRequest is ClientHello2 or a new handshake. */
585 unsigned char last_client_hello_random[32];
586
587 /* DTLS counters for handshake retransmission detection. */
588 uint32_t server_next_receive_seq;
589 uint32_t client_next_receive_seq;
590
591} SslDecryptSession;
592
593/* RecordNumber - RFC 9147 section 4 */
594typedef struct {
595 uint64_t epoch;
596 uint64_t sequence_number;
598
599/* User Access Table */
600typedef struct _ssldecrypt_assoc_t {
601 char* ipaddr;
602 char* port;
603 char* protocol;
604 char* keyfile;
605 char* password;
606} ssldecrypt_assoc_t;
608typedef struct ssl_common_options {
609 const char *psk;
610 const char *keylog_filename;
611} ssl_common_options_t;
612
613/** Map from something to a (pre-)master secret */
614typedef struct {
615 GHashTable *session; /* Session ID (1-32 bytes) to master secret. */
616 GHashTable *tickets; /* Session Ticket to master secret. */
617 GHashTable *crandom; /* Client Random to master secret */
618 GHashTable *pre_master; /* First 8 bytes of encrypted pre-master secret to
619 pre-master secret */
620 GHashTable *pms; /* Client Random to unencrypted pre-master secret */
621
622 /* For TLS 1.3: maps Client Random to derived secret. */
623 GHashTable *tls13_client_early;
624 GHashTable *tls13_client_handshake;
625 GHashTable *tls13_server_handshake;
626 GHashTable *tls13_client_appdata;
627 GHashTable *tls13_server_appdata;
628 GHashTable *tls13_early_exporter;
629 GHashTable *tls13_exporter;
630 GHashTable *ech_secret;
631 GHashTable *ech_config;
632
633 /* The hash tables above store the static keylog file contents and secrets
634 * from any DSB, not all of which may be used, in addition to any master
635 * secrets derived at runtime ([D]TLS < 1.3). These store the used
636 * Client Random for exporting master secrets and derived secrets in
637 * TLS Export Sessions or adding a DSB.
638 */
639 GHashTable *used_crandom;
641
642int ssl_get_keyex_alg(int cipher);
643
644void quic_transport_parameter_id_base_custom(char *result, uint64_t parameter_id);
645
646bool ssldecrypt_uat_fld_ip_chk_cb(void*, const char*, unsigned, const void*, const void*, char** err);
647bool ssldecrypt_uat_fld_port_chk_cb(void*, const char*, unsigned, const void*, const void*, char** err);
648bool ssldecrypt_uat_fld_fileopen_chk_cb(void*, const char*, unsigned, const void*, const void*, char** err);
649bool ssldecrypt_uat_fld_password_chk_cb(void*, const char*, unsigned, const void*, const void*, char** err);
650char* ssl_association_info(const char* dissector_table_name, const char* table_protocol);
651
653void ssl_init_cid_list(void);
654
656void ssl_cleanup_cid_list(void);
657
659void ssl_add_session_by_cid(SslDecryptSession *ssl);
660
666SslDecryptSession *ssl_get_session_by_cid(tvbuff_t *tvb, uint32_t offset);
667
673extern SslDecryptSession *
674ssl_get_session(conversation_t *conversation, dissector_handle_t tls_handle, uint8_t curr_layer_num);
675
684extern SslDecryptSession *
685tls_get_session(conversation_t *conversation, int proto_ssl, uint8_t curr_layer_num);
686
688extern void
689ssl_reset_session(SslSession *session, SslDecryptSession *ssl, bool is_client);
690
694extern void
695tls_check_client_hello_random(SslDecryptSession *ssl, tvbuff_t *tvb, uint32_t offset);
696
698extern void
699tls_transcript_reset(tls_transcript_t *transcript);
700
702extern void
703ssl_set_server(SslSession *session, address *addr, port_type ptype, uint32_t port);
704
712WS_DLL_PUBLIC void
713tls_set_appdata_dissector(dissector_handle_t tls_handle, packet_info *pinfo,
714 dissector_handle_t app_handle);
715
725WS_DLL_PUBLIC uint32_t
726ssl_starttls_ack(dissector_handle_t tls_handle, packet_info *pinfo,
727 dissector_handle_t app_handle);
728
737WS_DLL_PUBLIC uint32_t
738ssl_starttls_post_ack(dissector_handle_t tls_handle, packet_info *pinfo,
739 dissector_handle_t app_handle);
740
741extern dissector_handle_t
742ssl_find_appdata_dissector(const char *name);
743
749extern void
750ssl_data_set(StringInfo* buf, const unsigned char* src, unsigned len);
751
755extern int
756ssl_data_alloc(StringInfo* str, size_t len);
757
758extern int
759ssl_cipher_setiv(SSL_CIPHER_CTX *cipher, unsigned char* iv, int iv_len);
760
764extern const SslCipherSuite *
765ssl_find_cipher(int num);
766
767
769int
770ssl_get_cipher_algo(const SslCipherSuite *cipher_suite);
771
776unsigned
777ssl_get_cipher_blocksize(const SslCipherSuite *cipher_suite);
778
779bool
780ssl_generate_pre_master_secret(SslDecryptSession *ssl_session,
781 uint32_t length, tvbuff_t *tvb, uint32_t offset,
782 const char *ssl_psk, packet_info *pinfo,
783#ifdef HAVE_LIBGNUTLS
784 GHashTable *key_hash,
785#endif
786 const ssl_master_key_map_t *mk_map);
787
792extern int
793ssl_generate_keyring_material(SslDecryptSession*ssl_session);
794
795extern void
796ssl_change_cipher(SslDecryptSession *ssl_session, bool server);
797
813extern int
814ssl_decrypt_record(wmem_allocator_t* allocator, SslDecryptSession *ssl, SslDecoder *decoder, uint8_t ct, uint16_t record_version,
815 bool ignore_mac_failed,
816 const unsigned char *in, uint16_t inl, const unsigned char *cid, uint8_t cidl,
817 StringInfo *comp_str, StringInfo *out_str, unsigned *outl);
818
819
820/* Common part between TLS and DTLS dissectors */
821
822/* handling of association between tls/dtls ports and clear text protocol */
823extern void
824ssl_association_add(const char* dissector_table_name, dissector_handle_t main_handle, dissector_handle_t subdissector_handle, unsigned port, bool tcp);
825
826extern void
827ssl_association_remove(const char* dissector_table_name, dissector_handle_t main_handle, dissector_handle_t subdissector_handle, unsigned port, bool tcp);
828
829extern int
830ssl_packet_from_server(SslSession *session, dissector_table_t table, const packet_info *pinfo);
831
832/* Obtain information about the current TLS layer. */
834tls_add_packet_info(int proto, packet_info *pinfo, uint8_t curr_layer_num_ssl);
835
836/* add to packet data a copy of the specified real data */
837extern void
838ssl_add_record_info(int proto, packet_info *pinfo,
839 const unsigned char *plain_data, int plain_data_len, int content_len,
840 int record_id, SslFlow *flow, ContentType type, uint8_t curr_layer_num_ssl,
841 uint64_t record_seq);
842
843/* search in packet data for the specified id; return a newly created tvb for the associated data */
844extern tvbuff_t*
845ssl_get_record_info(tvbuff_t *parent_tvb, int proto, packet_info *pinfo, int record_id, uint8_t curr_layer_num_ssl, SslRecordInfo **matched_record);
846
847/* initialize/reset per capture state data (ssl sessions cache) */
848extern void
849ssl_common_init(ssl_master_key_map_t *master_key_map,
850 StringInfo *decrypted_data, StringInfo *compressed_data);
851extern void
852ssl_common_cleanup(ssl_master_key_map_t *master_key_map, FILE **ssl_keylog_file,
853 StringInfo *decrypted_data, StringInfo *compressed_data);
854
860WS_DLL_PUBLIC ssl_master_key_map_t *
861tls_get_master_key_map(bool load_secrets);
862
863extern bool
864tls_load_psk(SslDecryptSession *tls_session, const char *tls_psk);
865
866/* Process lines from the TLS key log and populate the secrets map. */
867extern void
868tls_keylog_process_lines(const ssl_master_key_map_t *mk_map, const uint8_t *data, unsigned len);
869
870/* tries to update the secrets cache from the given filename */
871extern void
872ssl_load_keyfile(const char *ssl_keylog_filename, FILE **keylog_file,
873 const ssl_master_key_map_t *mk_map);
874
875#ifdef HAVE_LIBGNUTLS
876/* parse ssl related preferences (private keys and ports association strings) */
877extern void
878ssl_parse_key_list(const ssldecrypt_assoc_t * uats, GHashTable *key_hash, const char* dissector_table_name, dissector_handle_t main_handle, bool tcp);
879#endif
880
881extern void
882ssl_finalize_decryption(SslDecryptSession *ssl, ssl_master_key_map_t *mk_map);
883
888extern void
889tls_save_crandom(SslDecryptSession *ssl, ssl_master_key_map_t *mk_map);
890
891extern bool
892tls13_generate_keys(SslDecryptSession *ssl_session, const StringInfo *secret, bool is_from_server);
893
894extern StringInfo *
895tls13_load_secret(SslDecryptSession *ssl, ssl_master_key_map_t *mk_map,
896 bool is_from_server, TLSRecordType type);
897
898extern void
899tls13_change_key(SslDecryptSession *ssl, ssl_master_key_map_t *mk_map,
900 bool is_from_server, TLSRecordType type);
901
902extern void
903tls13_key_update(SslDecryptSession *ssl, bool is_from_server);
904
905extern bool
906ssl_is_valid_content_type(uint8_t type);
907
908extern bool
909ssl_is_valid_handshake_type(uint8_t hs_type, bool is_dtls);
910
911extern bool
912tls_scan_server_hello(tvbuff_t *tvb, uint32_t offset, uint32_t offset_end,
913 uint16_t *server_version, bool *is_hrr);
914
915extern void
916ssl_try_set_version(SslSession *session, SslDecryptSession *ssl,
917 uint8_t content_type, uint8_t handshake_type,
918 bool is_dtls, uint16_t version);
919
920extern void
921ssl_calculate_handshake_hash(SslDecryptSession *ssl_session, tvbuff_t *tvb, uint32_t offset, uint32_t length, uint8_t msg_type, bool is_from_server);
922
923/* common header fields, subtrees and expert info for SSL and DTLS dissectors */
924typedef struct ssl_common_dissect {
925 struct {
926 int change_cipher_spec;
927 int hs_exts_len;
928 int hs_ext_alpn_len;
929 int hs_ext_alpn_list;
930 int hs_ext_alpn_str;
931 int hs_ext_alpn_str_len;
932 int hs_ext_cert_url_item;
933 int hs_ext_cert_url_padding;
934 int hs_ext_cert_url_sha1;
935 int hs_ext_cert_url_type;
936 int hs_ext_cert_url_url;
937 int hs_ext_cert_url_url_hash_list_len;
938 int hs_ext_cert_url_url_len;
939 int hs_ext_cert_status_type;
940 int hs_ext_cert_status_request_len;
941 int hs_ext_cert_status_responder_id_list_len;
942 int hs_ext_cert_status_request_extensions_len;
943 int hs_ext_cert_status_request_list_len;
944 int hs_ocsp_response_list_len;
945 int hs_ocsp_response_len;
946 int hs_ext_cert_type;
947 int hs_ext_cert_types;
948 int hs_ext_cert_types_len;
949 int hs_ext_data;
950 int hs_ext_ec_point_format;
951 int hs_ext_ec_point_formats;
952 int hs_ext_ec_point_formats_len;
953 int hs_ext_srp_len;
954 int hs_ext_srp_username;
955 int hs_ext_supported_group;
956 int hs_ext_supported_groups;
957 int hs_ext_supported_groups_len;
958 int hs_ext_ech_outer_ext;
959 int hs_ext_ech_outer_ext_len;
960 int hs_ech_confirm;
961 int hs_ech_confirm_compute;
962 int hs_ext_heartbeat_mode;
963 int hs_ext_len;
964 int hs_ext_npn_str;
965 int hs_ext_npn_str_len;
966 int hs_ext_reneg_info_len;
967 int hs_ext_reneg_info;
968 int hs_ext_key_share_client_length;
969 int hs_ext_key_share_group;
970 int hs_ext_key_share_key_exchange_length;
971 int hs_ext_key_share_key_exchange;
972 int hs_ext_key_share_selected_group;
973 int hs_ext_psk_identities_length;
974 int hs_ext_psk_identity_identity_length;
975 int hs_ext_psk_identity_identity;
976 int hs_ext_psk_identity_obfuscated_ticket_age;
977 int hs_ext_psk_binders_length;
978 int hs_ext_psk_binders;
979 int hs_ext_psk_binder;
980 int hs_ext_psk_binder_binder_length;
981 int hs_ext_psk_binder_binder;
982 int hs_ext_psk_identity_selected;
983 int hs_ext_session_ticket;
984 int hs_ext_supported_versions_len;
985 int hs_ext_supported_version;
986 int hs_ext_cookie_len;
987 int hs_ext_cookie;
988 int hs_ext_server_name;
989 int hs_ext_server_name_len;
990 int hs_ext_server_name_list_len;
991 int hs_ext_server_name_type;
992 int hs_ext_max_fragment_length;
993 int hs_ext_padding_data;
994 int hs_ext;
995 int hs_ext_type;
996 int hs_ext_connection_id_length;
997 int hs_ext_connection_id;
998 int hs_ext_trusted_ca_keys_len;
999 int hs_ext_trusted_ca_keys_list;
1000 int hs_ext_trusted_ca_key;
1001 int hs_ext_trusted_ca_key_type;
1002 int hs_ext_trusted_ca_key_hash;
1003 int hs_ext_trusted_ca_key_dname_len;
1004 int hs_ext_trusted_ca_key_dname;
1005 int hs_sig_hash_alg;
1006 int hs_sig_hash_alg_len;
1007 int hs_sig_hash_algs;
1008 int hs_sig_hash_hash;
1009 int hs_sig_hash_sig;
1010 int hs_client_keyex_epms_len;
1011 int hs_client_keyex_epms;
1012 int hs_server_keyex_modulus_len;
1013 int hs_server_keyex_exponent_len;
1014 int hs_server_keyex_sig_len;
1015 int hs_server_keyex_p_len;
1016 int hs_server_keyex_g_len;
1017 int hs_server_keyex_ys_len;
1018 int hs_client_keyex_yc_len;
1019 int hs_client_keyex_point_len;
1020 int hs_server_keyex_point_len;
1021 int hs_server_keyex_p;
1022 int hs_server_keyex_g;
1023 int hs_server_keyex_curve_type;
1024 int hs_server_keyex_named_curve;
1025 int hs_server_keyex_ys;
1026 int hs_client_keyex_yc;
1027 int hs_server_keyex_point;
1028 int hs_client_keyex_point;
1029 int hs_server_keyex_xs_len;
1030 int hs_client_keyex_xc_len;
1031 int hs_server_keyex_xs;
1032 int hs_client_keyex_xc;
1033 int hs_server_keyex_vs_len;
1034 int hs_client_keyex_vc_len;
1035 int hs_server_keyex_vs;
1036 int hs_client_keyex_vc;
1037 int hs_server_keyex_rs_len;
1038 int hs_client_keyex_rc_len;
1039 int hs_server_keyex_rs;
1040 int hs_client_keyex_rc;
1041 int hs_server_keyex_modulus;
1042 int hs_server_keyex_exponent;
1043 int hs_server_keyex_sig;
1044 int hs_server_keyex_hint_len;
1045 int hs_server_keyex_hint;
1046 int hs_client_keyex_identity_len;
1047 int hs_client_keyex_identity;
1048 int hs_certificates_len;
1049 int hs_certificates;
1050 int hs_certificate_len;
1051 int hs_certificate;
1052 int hs_cert_types_count;
1053 int hs_cert_types;
1054 int hs_cert_type;
1055 int hs_dnames_len;
1056 int hs_dnames;
1057 int hs_dnames_truncated;
1058 int hs_dname_len;
1059 int hs_dname;
1060 int hs_random;
1061 int hs_random_time;
1062 int hs_random_bytes;
1063 int hs_session_id;
1064 int hs_session_id_len;
1065 int hs_client_version;
1066 int hs_server_version;
1067 int hs_cipher_suites_len;
1068 int hs_cipher_suites;
1069 int hs_cipher_suite;
1070 int hs_comp_methods_len;
1071 int hs_comp_methods;
1072 int hs_comp_method;
1073 int hs_session_ticket_lifetime_hint;
1074 int hs_session_ticket_age_add;
1075 int hs_session_ticket_nonce_len;
1076 int hs_session_ticket_nonce;
1077 int hs_session_ticket_len;
1078 int hs_session_ticket;
1079 int hs_finished;
1080 int hs_client_cert_vrfy_sig_len;
1081 int hs_client_cert_vrfy_sig;
1082 int hs_ja3_full;
1083 int hs_ja3_hash;
1084 int hs_ja3s_full;
1085 int hs_ja3s_hash;
1086 int hs_ja4;
1087 int hs_ja4_r;
1088
1089 /* TLS 1.3 */
1090 int hs_ext_psk_ke_modes_length;
1091 int hs_ext_psk_ke_mode;
1092 int hs_certificate_request_context_length;
1093 int hs_certificate_request_context;
1094 int hs_key_update_request_update;
1095 int sct_scts_length;
1096 int sct_sct_length;
1097 int sct_sct_version;
1098 int sct_sct_logid;
1099 int sct_sct_timestamp;
1100 int sct_sct_extensions_length;
1101 int sct_sct_extensions;
1102 int sct_sct_signature;
1103 int sct_sct_signature_length;
1104 int hs_ext_max_early_data_size;
1105 int hs_ext_oid_filters_length;
1106 int hs_ext_oid_filters_oid_length;
1107 int hs_ext_oid_filters_oid;
1108 int hs_ext_oid_filters_values_length;
1109 int hs_cred_valid_time;
1110 int hs_cred_pubkey;
1111 int hs_cred_pubkey_len;
1112 int hs_cred_signature;
1113 int hs_cred_signature_len;
1114
1115 /* compress_certificate */
1116 int hs_ext_compress_certificate_algorithms_length;
1117 int hs_ext_compress_certificate_algorithm;
1118 int hs_ext_compress_certificate_uncompressed_length;
1119 int hs_ext_compress_certificate_compressed_certificate_message_length;
1120 int hs_ext_compress_certificate_compressed_certificate_message;
1121
1122 /* Token Binding Negotiation */
1123 int hs_ext_token_binding_version_major;
1124 int hs_ext_token_binding_version_minor;
1125 int hs_ext_token_binding_key_parameters;
1126 int hs_ext_token_binding_key_parameters_length;
1127 int hs_ext_token_binding_key_parameter;
1128
1129 int hs_ext_record_size_limit;
1130
1131 /* QUIC Transport Parameters */
1132 int hs_ext_quictp_len;
1133 int hs_ext_quictp_parameter;
1134 int hs_ext_quictp_parameter_type;
1135 int hs_ext_quictp_parameter_len;
1136 int hs_ext_quictp_parameter_len_old;
1137 int hs_ext_quictp_parameter_value;
1138 int hs_ext_quictp_parameter_original_destination_connection_id;
1139 int hs_ext_quictp_parameter_max_idle_timeout;
1140 int hs_ext_quictp_parameter_stateless_reset_token;
1141 int hs_ext_quictp_parameter_initial_max_data;
1142 int hs_ext_quictp_parameter_initial_max_stream_data_bidi_local;
1143 int hs_ext_quictp_parameter_initial_max_stream_data_bidi_remote;
1144 int hs_ext_quictp_parameter_initial_max_stream_data_uni;
1145 int hs_ext_quictp_parameter_initial_max_streams_bidi;
1146 int hs_ext_quictp_parameter_initial_max_streams_uni;
1147 int hs_ext_quictp_parameter_ack_delay_exponent;
1148 int hs_ext_quictp_parameter_max_ack_delay;
1149 int hs_ext_quictp_parameter_max_udp_payload_size;
1150 int hs_ext_quictp_parameter_pa_ipv4address;
1151 int hs_ext_quictp_parameter_pa_ipv6address;
1152 int hs_ext_quictp_parameter_pa_ipv4port;
1153 int hs_ext_quictp_parameter_pa_ipv6port;
1154 int hs_ext_quictp_parameter_pa_connectionid_length;
1155 int hs_ext_quictp_parameter_pa_connectionid;
1156 int hs_ext_quictp_parameter_pa_statelessresettoken;
1157 int hs_ext_quictp_parameter_active_connection_id_limit;
1158 int hs_ext_quictp_parameter_initial_source_connection_id;
1159 int hs_ext_quictp_parameter_retry_source_connection_id;
1160 int hs_ext_quictp_parameter_max_datagram_frame_size;
1161 int hs_ext_quictp_parameter_cibir_encoding_length;
1162 int hs_ext_quictp_parameter_cibir_encoding_offset;
1163 int hs_ext_quictp_parameter_loss_bits;
1164 int hs_ext_quictp_parameter_address_discovery;
1165 int hs_ext_quictp_parameter_enable_time_stamp_v2;
1166 int hs_ext_quictp_parameter_min_ack_delay;
1167 int hs_ext_quictp_parameter_google_user_agent_id;
1168 int hs_ext_quictp_parameter_google_key_update_not_yet_supported;
1169 int hs_ext_quictp_parameter_google_quic_version;
1170 int hs_ext_quictp_parameter_google_initial_rtt;
1171 int hs_ext_quictp_parameter_google_support_handshake_done;
1172 int hs_ext_quictp_parameter_google_quic_params;
1173 int hs_ext_quictp_parameter_google_quic_params_unknown_field;
1174 int hs_ext_quictp_parameter_google_connection_options;
1175 int hs_ext_quictp_parameter_google_supported_versions_length;
1176 int hs_ext_quictp_parameter_google_supported_version;
1177 int hs_ext_quictp_parameter_facebook_partial_reliability;
1178 int hs_ext_quictp_parameter_chosen_version;
1179 int hs_ext_quictp_parameter_other_version;
1180 int hs_ext_quictp_parameter_enable_multipath;
1181 int hs_ext_quictp_parameter_initial_max_paths;
1182 int hs_ext_quictp_parameter_initial_max_path_id;
1183
1184 int esni_suite;
1185 int esni_record_digest_length;
1186 int esni_record_digest;
1187 int esni_encrypted_sni_length;
1188 int esni_encrypted_sni;
1189 int esni_nonce;
1190
1191 int ech_echconfiglist_length;
1192 int ech_echconfiglist;
1193 int ech_echconfig;
1194 int ech_echconfig_version;
1195 int ech_echconfig_length;
1196 int ech_echconfigcontents_maximum_name_length;
1197 int ech_echconfigcontents_public_name_length;
1198 int ech_echconfigcontents_public_name;
1199 int ech_echconfigcontents_extensions_length;
1200 int ech_echconfigcontents_extensions;
1201 int ech_hpke_keyconfig;
1202 int ech_hpke_keyconfig_config_id;
1203 int ech_hpke_keyconfig_kem_id;
1204 int ech_hpke_keyconfig_public_key_length;
1205 int ech_hpke_keyconfig_public_key;
1206 int ech_hpke_keyconfig_cipher_suites;
1207 int ech_hpke_keyconfig_cipher_suites_length;
1208 int ech_hpke_keyconfig_cipher_suite;
1209 int ech_hpke_keyconfig_cipher_suite_kdf_id;
1210 int ech_hpke_keyconfig_cipher_suite_aead_id;
1211 int ech_clienthello_type;
1212 int ech_cipher_suite;
1213 int ech_config_id;
1214 int ech_enc_length;
1215 int ech_enc;
1216 int ech_payload_length;
1217 int ech_payload;
1218 int ech_confirmation;
1219 int ech_retry_configs;
1220 int ech_padding_data;
1221
1222 int hs_ext_alps_len;
1223 int hs_ext_alps_alpn_list;
1224 int hs_ext_alps_alpn_str;
1225 int hs_ext_alps_alpn_str_len;
1226 int hs_ext_alps_settings;
1227
1228 /* do not forget to update SSL_COMMON_HF_LIST! */
1229 } hf;
1230 struct {
1231 int hs_ext;
1232 int hs_ext_alpn;
1233 int hs_ext_cert_types;
1234 int hs_ext_groups;
1235 int hs_ext_curves_point_formats;
1236 int hs_ext_npn;
1237 int hs_ext_reneg_info;
1238 int hs_ext_key_share;
1239 int hs_ext_key_share_ks;
1240 int hs_ext_pre_shared_key;
1241 int hs_ext_psk_identity;
1242 int hs_ext_psk_binders;
1243 int hs_ext_psk_binder;
1244 int hs_ext_server_name;
1245 int hs_ext_oid_filter;
1246 int hs_ext_quictp_parameter;
1247 int hs_ext_trusted_ca_keys;
1248 int hs_ext_trusted_ca_key;
1249 int hs_sig_hash_alg;
1250 int hs_sig_hash_algs;
1251 int urlhash;
1252 int keyex_params;
1253 int certificates;
1254 int cert_types;
1255 int dnames;
1256 int hs_random;
1257 int cipher_suites;
1258 int comp_methods;
1259 int session_ticket;
1260 int sct;
1261 int cert_status;
1262 int ocsp_response;
1263 int uncompressed_certificates;
1264 int hs_ext_alps;
1265 int ech_echconfiglist;
1266 int ech_echconfig;
1267 int ech_retry_configs;
1268 int ech_hpke_keyconfig;
1269 int ech_hpke_cipher_suites;
1270 int ech_hpke_cipher_suite;
1271 int ech_decrypt;
1272 int hs_ext_token_binding_key_parameters;
1273
1274 /* do not forget to update SSL_COMMON_ETT_LIST! */
1275 } ett;
1276 struct {
1277 /* Generic expert info for malformed packets. */
1278 expert_field client_version_error;
1279 expert_field server_version_error;
1280 expert_field legacy_version;
1281 expert_field malformed_vector_length;
1282 expert_field malformed_buffer_too_small;
1283 expert_field malformed_trailing_data;
1284
1285 expert_field hs_ext_cert_status_undecoded;
1286 expert_field hs_ciphersuite_undecoded;
1287 expert_field hs_srv_keyex_illegal;
1288 expert_field resumed;
1289 expert_field record_length_invalid;
1290 expert_field decompression_error;
1291
1292 expert_field ech_echconfig_invalid_version;
1293 expert_field ech_accepted;
1294 expert_field ech_rejected;
1295
1296 /* do not forget to update SSL_COMMON_EI_LIST! */
1297 } ei;
1298} ssl_common_dissect_t;
1299
1300/* Header fields specific to DTLS. See packet-dtls.c */
1301typedef struct {
1302 int hf_dtls_handshake_cookie_len;
1303 int hf_dtls_handshake_cookie;
1304
1305 /* Do not forget to initialize dtls_hfs to -1 in packet-dtls.c! */
1306} dtls_hfs_t;
1307
1308/* Header fields specific to SSL. See packet-tls.c */
1309typedef struct {
1310 int hs_md5_hash;
1311 int hs_sha_hash;
1312
1313 /* Do not forget to initialize ssl_hfs to -1 in packet-tls.c! */
1314} ssl_hfs_t;
1316typedef struct {
1317 uint32_t max_version;
1318 bool server_name_present;
1319 int num_cipher_suites;
1320 int num_extensions;
1321 wmem_strbuf_t *alpn;
1322 wmem_array_t *cipher_array;
1323 wmem_array_t *extension_array;
1324 wmem_list_t *sighash_list;
1325} ja4_data_t;
1326
1327
1328/* Helpers for dissecting Variable-Length Vectors. {{{ */
1329/* Largest value that fits in a 24-bit number (2^24-1). */
1330#define G_MAXUINT24 ((1U << 24) - 1)
1331
1344extern bool
1345ssl_add_vector(ssl_common_dissect_t *hf, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
1346 unsigned offset, unsigned offset_end, uint32_t *ret_length,
1347 int hf_length, uint32_t min_value, uint32_t max_value);
1348
1357extern bool
1358ssl_end_vector(ssl_common_dissect_t *hf, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
1359 unsigned offset, unsigned offset_end);
1360/* }}} */
1361
1362
1363extern void
1364ssl_check_record_length(ssl_common_dissect_t *hf, packet_info *pinfo,
1365 ContentType content_type,
1366 unsigned record_length, proto_item *length_pi,
1367 uint16_t version, tvbuff_t *decrypted_tvb);
1368
1369void
1370ssl_dissect_change_cipher_spec(ssl_common_dissect_t *hf, tvbuff_t *tvb,
1371 packet_info *pinfo, proto_tree *tree,
1372 uint32_t offset, SslSession *session,
1373 bool is_from_server,
1374 const SslDecryptSession *ssl);
1375
1376extern int
1377ssl_dissect_hnd_cli_hello(ssl_common_dissect_t *hf, tvbuff_t *tvb,
1378 packet_info *pinfo, proto_tree *tree, uint32_t offset,
1379 uint32_t offset_end, SslSession *session,
1380 SslDecryptSession *ssl,
1381 dtls_hfs_t *dtls_hfs, ssl_master_key_map_t *mk_map);
1382
1383extern void
1384ssl_dissect_hnd_srv_hello(ssl_common_dissect_t *hf, tvbuff_t *tvb, packet_info* pinfo,
1385 proto_tree *tree, uint32_t offset, uint32_t offset_end,
1386 SslSession *session, SslDecryptSession *ssl,
1387 bool is_dtls, bool is_hrr);
1388
1389extern void
1390ssl_dissect_hnd_hello_retry_request(ssl_common_dissect_t *hf, tvbuff_t *tvb, packet_info* pinfo,
1391 proto_tree *tree, uint32_t offset, uint32_t offset_end,
1392 SslSession *session, SslDecryptSession *ssl,
1393 bool is_dtls);
1394
1395extern void
1396ssl_dissect_hnd_encrypted_extensions(ssl_common_dissect_t *hf, tvbuff_t *tvb, packet_info* pinfo,
1397 proto_tree *tree, uint32_t offset, uint32_t offset_end,
1398 SslSession *session, SslDecryptSession *ssl,
1399 bool is_dtls);
1400
1401extern void
1402ssl_dissect_hnd_new_ses_ticket(ssl_common_dissect_t *hf, tvbuff_t *tvb, packet_info *pinfo,
1403 proto_tree *tree, uint32_t offset, uint32_t offset_end,
1404 SslSession *session, SslDecryptSession *ssl,
1405 bool is_dtls, GHashTable *session_hash);
1406
1407extern void
1408ssl_dissect_hnd_cert(ssl_common_dissect_t *hf, tvbuff_t *tvb, proto_tree *tree,
1409 uint32_t offset, uint32_t offset_end, packet_info *pinfo,
1410 SslSession *session, SslDecryptSession *ssl,
1411 bool is_from_server, bool is_dtls);
1412
1413extern void
1414ssl_dissect_hnd_cert_req(ssl_common_dissect_t *hf, tvbuff_t *tvb, packet_info *pinfo,
1415 proto_tree *tree, uint32_t offset, uint32_t offset_end,
1416 SslSession *session, bool is_dtls);
1417
1418extern void
1419ssl_dissect_hnd_cli_cert_verify(ssl_common_dissect_t *hf, tvbuff_t *tvb, packet_info *pinfo,
1420 proto_tree *tree, uint32_t offset, uint32_t offset_end, uint16_t version);
1421
1422extern void
1423ssl_dissect_hnd_finished(ssl_common_dissect_t *hf, tvbuff_t *tvb,
1424 proto_tree *tree, uint32_t offset, uint32_t offset_end,
1425 const SslSession *session, ssl_hfs_t *ssl_hfs);
1426
1427extern void
1428ssl_dissect_hnd_cert_url(ssl_common_dissect_t *hf, tvbuff_t *tvb, proto_tree *tree, uint32_t offset);
1429
1430extern uint32_t
1431tls_dissect_hnd_certificate_status(ssl_common_dissect_t *hf, tvbuff_t *tvb, packet_info *pinfo,
1432 proto_tree *tree, uint32_t offset, uint32_t offset_end);
1433
1434extern void
1435ssl_dissect_hnd_cli_keyex(ssl_common_dissect_t *hf, tvbuff_t *tvb,
1436 proto_tree *tree, uint32_t offset, uint32_t length,
1437 const SslSession *session);
1438
1439extern void
1440ssl_dissect_hnd_srv_keyex(ssl_common_dissect_t *hf, tvbuff_t *tvb, packet_info *pinfo,
1441 proto_tree *tree, uint32_t offset, uint32_t offset_end,
1442 const SslSession *session);
1443
1444extern void
1445tls13_dissect_hnd_key_update(ssl_common_dissect_t *hf, tvbuff_t *tvb,
1446 proto_tree *tree, uint32_t offset);
1447
1448extern uint32_t
1449tls_dissect_sct_list(ssl_common_dissect_t *hf, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
1450 uint32_t offset, uint32_t offset_end, uint16_t version);
1451
1452extern bool
1453tls13_hkdf_expand_label_context(int md, const StringInfo *secret,
1454 const char *label_prefix, const char *label,
1455 const uint8_t *context, uint8_t context_length,
1456 uint16_t out_len, unsigned char **out);
1457
1458extern bool
1459tls13_hkdf_expand_label(int md, const StringInfo *secret,
1460 const char *label_prefix, const char *label,
1461 uint16_t out_len, unsigned char **out);
1462
1463extern void
1464ssl_dissect_hnd_compress_certificate(ssl_common_dissect_t *hf, tvbuff_t *tvb, proto_tree *tree,
1465 uint32_t offset, uint32_t offset_end, packet_info *pinfo,
1466 SslSession *session _U_, SslDecryptSession *ssl _U_,
1467 bool is_from_server _U_, bool is_dtls _U_);
1468
1469extern tap_packet_status
1470ssl_follow_tap_listener(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_, const void *ssl, tap_flags_t flags _U_);
1471
1472/* {{{ */
1473#define SSL_COMMON_LIST_T(name) \
1474ssl_common_dissect_t name
1475/* }}} */
1476
1477/* {{{ */
1478#define SSL_COMMON_HF_LIST(name, prefix) \
1479 { & name .hf.change_cipher_spec, \
1480 { "Change Cipher Spec Message", prefix ".change_cipher_spec", \
1481 FT_NONE, BASE_NONE, NULL, 0x0, \
1482 "Signals a change in cipher specifications", HFILL } \
1483 }, \
1484 { & name .hf.hs_exts_len, \
1485 { "Extensions Length", prefix ".handshake.extensions_length", \
1486 FT_UINT16, BASE_DEC, NULL, 0x0, \
1487 "Length of hello extensions", HFILL } \
1488 }, \
1489 { & name .hf.hs_ext, \
1490 { "Extension", prefix ".handshake.extension", \
1491 FT_NONE, BASE_NONE, NULL, 0x0, \
1492 "Hello extension", HFILL } \
1493 }, \
1494 { & name .hf.hs_ext_type, \
1495 { "Type", prefix ".handshake.extension.type", \
1496 FT_UINT16, BASE_DEC, VALS(tls_hello_extension_types), 0x0, \
1497 "Hello extension type", HFILL } \
1498 }, \
1499 { & name .hf.hs_ext_len, \
1500 { "Length", prefix ".handshake.extension.len", \
1501 FT_UINT16, BASE_DEC, NULL, 0x0, \
1502 "Length of a hello extension", HFILL } \
1503 }, \
1504 { & name .hf.hs_ext_data, \
1505 { "Data", prefix ".handshake.extension.data", \
1506 FT_BYTES, BASE_NONE, NULL, 0x0, \
1507 "Hello Extension data", HFILL } \
1508 }, \
1509 { & name .hf.hs_ext_ech_outer_ext_len, \
1510 { "Outer Extensions List Length", prefix ".handshake.extensions_ech_outer_extensions_length", \
1511 FT_UINT8, BASE_DEC, NULL, 0x0, \
1512 NULL, HFILL } \
1513 }, \
1514 { & name .hf.hs_ext_ech_outer_ext, \
1515 { "Outer Extensions List", prefix ".handshake.extensions_ech_outer_extensions", \
1516 FT_NONE, BASE_NONE, NULL, 0x0, \
1517 "List of extensions derived from Outer Client Hello", HFILL } \
1518 }, \
1519 { & name .hf.hs_ech_confirm, \
1520 { "ECH Confirmation Bytes", prefix ".handshake.ech_confirm", \
1521 FT_BYTES, BASE_NONE, NULL, 0x0, \
1522 NULL, HFILL } \
1523 }, \
1524 { & name .hf.hs_ech_confirm_compute, \
1525 { "Computed ECH Confirmation Bytes", prefix ".handshake.ech_confirm_compute", \
1526 FT_BYTES, BASE_NONE, NULL, 0x0, \
1527 NULL, HFILL } \
1528 }, \
1529 { & name .hf.hs_ext_supported_groups_len, \
1530 { "Supported Groups List Length", prefix ".handshake.extensions_supported_groups_length", \
1531 FT_UINT16, BASE_DEC, NULL, 0x0, \
1532 NULL, HFILL } \
1533 }, \
1534 { & name .hf.hs_ext_supported_groups, \
1535 { "Supported Groups List", prefix ".handshake.extensions_supported_groups", \
1536 FT_NONE, BASE_NONE, NULL, 0x0, \
1537 "List of supported groups (formerly Supported Elliptic Curves)", HFILL } \
1538 }, \
1539 { & name .hf.hs_ext_supported_group, \
1540 { "Supported Group", prefix ".handshake.extensions_supported_group", \
1541 FT_UINT16, BASE_HEX, VALS(ssl_extension_curves), 0x0, \
1542 NULL, HFILL } \
1543 }, \
1544 { & name .hf.hs_ext_ec_point_formats_len, \
1545 { "EC point formats Length", prefix ".handshake.extensions_ec_point_formats_length", \
1546 FT_UINT8, BASE_DEC, NULL, 0x0, \
1547 "Length of elliptic curves point formats field", HFILL } \
1548 }, \
1549 { & name .hf.hs_ext_ec_point_formats, \
1550 { "EC point formats", prefix ".handshake.extensions_ec_point_formats", \
1551 FT_NONE, BASE_NONE, NULL, 0x0, \
1552 "List of elliptic curves point format", HFILL } \
1553 }, \
1554 { & name .hf.hs_ext_ec_point_format, \
1555 { "EC point format", prefix ".handshake.extensions_ec_point_format", \
1556 FT_UINT8, BASE_DEC, VALS(ssl_extension_ec_point_formats), 0x0, \
1557 "Elliptic curves point format", HFILL } \
1558 }, \
1559 { & name .hf.hs_ext_srp_len, \
1560 { "SRP username length", prefix ".handshake.extensions_srp_len", \
1561 FT_UINT8, BASE_DEC, NULL, 0x0, \
1562 "Length of Secure Remote Password username field", HFILL } \
1563 }, \
1564 { & name .hf.hs_ext_srp_username, \
1565 { "SRP username", prefix ".handshake.extensions_srp_username", \
1566 FT_STRING, BASE_NONE, NULL, 0x0, \
1567 "Secure Remote Password username", HFILL } \
1568 }, \
1569 { & name .hf.hs_ext_alpn_len, \
1570 { "ALPN Extension Length", prefix ".handshake.extensions_alpn_len", \
1571 FT_UINT16, BASE_DEC, NULL, 0x0, \
1572 "Length of the ALPN Extension", HFILL } \
1573 }, \
1574 { & name .hf.hs_ext_alpn_list, \
1575 { "ALPN Protocol", prefix ".handshake.extensions_alpn_list", \
1576 FT_NONE, BASE_NONE, NULL, 0x0, \
1577 NULL, HFILL } \
1578 }, \
1579 { & name .hf.hs_ext_alpn_str_len, \
1580 { "ALPN string length", prefix ".handshake.extensions_alpn_str_len", \
1581 FT_UINT8, BASE_DEC, NULL, 0x0, \
1582 "Length of ALPN string", HFILL } \
1583 }, \
1584 { & name .hf.hs_ext_alpn_str, \
1585 { "ALPN Next Protocol", prefix ".handshake.extensions_alpn_str", \
1586 FT_STRING, BASE_NONE, NULL, 0x00, \
1587 NULL, HFILL } \
1588 }, \
1589 { & name .hf.hs_ext_npn_str_len, \
1590 { "Protocol string length", prefix ".handshake.extensions_npn_str_len", \
1591 FT_UINT8, BASE_DEC, NULL, 0x0, \
1592 "Length of next protocol string", HFILL } \
1593 }, \
1594 { & name .hf.hs_ext_npn_str, \
1595 { "Next Protocol", prefix ".handshake.extensions_npn", \
1596 FT_STRING, BASE_NONE, NULL, 0x0, \
1597 NULL, HFILL } \
1598 }, \
1599 { & name .hf.hs_ext_reneg_info_len, \
1600 { "Renegotiation info extension length", prefix ".handshake.extensions_reneg_info_len", \
1601 FT_UINT8, BASE_DEC, NULL, 0x0, \
1602 NULL, HFILL } \
1603 }, \
1604 { & name .hf.hs_ext_reneg_info, \
1605 { "Renegotiation info", prefix ".handshake.extensions_reneg_info",\
1606 FT_BYTES, BASE_NONE, NULL, 0x0, \
1607 NULL, HFILL } \
1608 }, \
1609 { & name .hf.hs_ext_key_share_client_length, \
1610 { "Client Key Share Length", prefix ".handshake.extensions_key_share_client_length", \
1611 FT_UINT16, BASE_DEC, NULL, 0x00, \
1612 NULL, HFILL } \
1613 }, \
1614 { & name .hf.hs_ext_key_share_group, \
1615 { "Group", prefix ".handshake.extensions_key_share_group", \
1616 FT_UINT16, BASE_DEC, VALS(ssl_extension_curves), 0x00, \
1617 NULL, HFILL } \
1618 }, \
1619 { & name .hf.hs_ext_key_share_key_exchange_length, \
1620 { "Key Exchange Length", prefix ".handshake.extensions_key_share_key_exchange_length", \
1621 FT_UINT16, BASE_DEC, NULL, 0x00, \
1622 NULL, HFILL } \
1623 }, \
1624 { & name .hf.hs_ext_key_share_key_exchange, \
1625 { "Key Exchange", prefix ".handshake.extensions_key_share_key_exchange", \
1626 FT_BYTES, BASE_NONE, NULL, 0x0, \
1627 NULL, HFILL } \
1628 }, \
1629 { & name .hf.hs_ext_key_share_selected_group, \
1630 { "Selected Group", prefix ".handshake.extensions_key_share_selected_group", \
1631 FT_UINT16, BASE_DEC, VALS(ssl_extension_curves), 0x00, \
1632 NULL, HFILL } \
1633 }, \
1634 { & name .hf.hs_ext_psk_identities_length, \
1635 { "Identities Length", prefix ".handshake.extensions.psk.identities.length", \
1636 FT_UINT16, BASE_DEC, NULL, 0x0, \
1637 NULL, HFILL } \
1638 }, \
1639 { & name .hf.hs_ext_psk_identity_identity_length, \
1640 { "Identity Length", prefix ".handshake.extensions.psk.identity.identity_length", \
1641 FT_UINT16, BASE_DEC, NULL, 0x0, \
1642 NULL, HFILL } \
1643 }, \
1644 { & name .hf.hs_ext_psk_identity_identity, \
1645 { "Identity", prefix ".handshake.extensions.psk.identity.identity", \
1646 FT_BYTES, BASE_NONE, NULL, 0x0, \
1647 NULL, HFILL } \
1648 }, \
1649 { & name .hf.hs_ext_psk_identity_obfuscated_ticket_age, \
1650 { "Obfuscated Ticket Age", prefix ".handshake.extensions.psk.identity.obfuscated_ticket_age", \
1651 FT_UINT32, BASE_DEC, NULL, 0x0, \
1652 NULL, HFILL } \
1653 }, \
1654 { & name .hf.hs_ext_psk_binders_length, \
1655 { "PSK Binders length", prefix ".handshake.extensions.psk.binders_len", \
1656 FT_UINT16, BASE_DEC, NULL, 0x0, \
1657 NULL, HFILL } \
1658 }, \
1659 { & name .hf.hs_ext_psk_binders, \
1660 { "PSK Binders", prefix ".handshake.extensions.psk.binders", \
1661 FT_NONE, BASE_NONE, NULL, 0x0, \
1662 NULL, HFILL } \
1663 }, \
1664 { & name .hf.hs_ext_psk_binder, \
1665 { "PSK Binder", prefix ".handshake.extensions.psk.binder", \
1666 FT_NONE, BASE_NONE, NULL, 0x0, \
1667 NULL, HFILL } \
1668 }, \
1669 { & name .hf.hs_ext_psk_binder_binder_length, \
1670 { "Binder Length", prefix ".handshake.extensions.psk.binder.binder_length", \
1671 FT_UINT8, BASE_DEC, NULL, 0x0, \
1672 NULL, HFILL } \
1673 }, \
1674 { & name .hf.hs_ext_psk_binder_binder, \
1675 { "Binder", prefix ".handshake.extensions.psk.binder.binder", \
1676 FT_BYTES, BASE_NONE, NULL, 0x0, \
1677 NULL, HFILL } \
1678 }, \
1679 { & name .hf.hs_ext_psk_identity_selected, \
1680 { "Selected Identity", prefix ".handshake.extensions.psk.identity.selected", \
1681 FT_UINT16, BASE_DEC, NULL, 0x0, \
1682 NULL, HFILL } \
1683 }, \
1684 { & name .hf.hs_ext_session_ticket, \
1685 { "Session Ticket", prefix ".handshake.extensions.session_ticket", \
1686 FT_BYTES, BASE_NONE, NULL, 0x0, \
1687 NULL, HFILL } \
1688 }, \
1689 { & name .hf.hs_ext_supported_versions_len, \
1690 { "Supported Versions length", prefix ".handshake.extensions.supported_versions_len", \
1691 FT_UINT8, BASE_DEC, NULL, 0x0, \
1692 NULL, HFILL } \
1693 }, \
1694 { & name .hf.hs_ext_supported_version, \
1695 { "Supported Version", prefix ".handshake.extensions.supported_version", \
1696 FT_UINT16, BASE_HEX, VALS(ssl_versions), 0x0, \
1697 NULL, HFILL } \
1698 }, \
1699 { & name .hf.hs_ext_cookie_len, \
1700 { "Cookie length", prefix ".handshake.extensions.cookie_len", \
1701 FT_UINT16, BASE_DEC, NULL, 0x0, \
1702 NULL, HFILL } \
1703 }, \
1704 { & name .hf.hs_ext_cookie, \
1705 { "Cookie", prefix ".handshake.extensions.cookie", \
1706 FT_BYTES, BASE_NONE, NULL, 0x0, \
1707 NULL, HFILL } \
1708 }, \
1709 { & name .hf.hs_ext_server_name_list_len, \
1710 { "Server Name list length", prefix ".handshake.extensions_server_name_list_len", \
1711 FT_UINT16, BASE_DEC, NULL, 0x0, \
1712 "Length of server name list", HFILL } \
1713 }, \
1714 { & name .hf.hs_ext_server_name_len, \
1715 { "Server Name length", prefix ".handshake.extensions_server_name_len", \
1716 FT_UINT16, BASE_DEC, NULL, 0x0, \
1717 "Length of server name string", HFILL } \
1718 }, \
1719 { & name .hf.hs_ext_server_name_type, \
1720 { "Server Name Type", prefix ".handshake.extensions_server_name_type", \
1721 FT_UINT8, BASE_DEC, VALS(tls_hello_ext_server_name_type_vs), 0x0, \
1722 NULL, HFILL } \
1723 }, \
1724 { & name .hf.hs_ext_server_name, \
1725 { "Server Name", prefix ".handshake.extensions_server_name", \
1726 FT_STRING, BASE_NONE, NULL, 0x0, \
1727 NULL, HFILL } \
1728 }, \
1729 { & name .hf.hs_ext_max_fragment_length, \
1730 { "Maximum Fragment Length", prefix ".handshake.max_fragment_length", \
1731 FT_UINT8, BASE_DEC, VALS(tls_hello_ext_max_fragment_length), 0x00, \
1732 "Maximum fragment length that an endpoint is willing to receive", HFILL } \
1733 }, \
1734 { & name .hf.hs_ext_padding_data, \
1735 { "Padding Data", prefix ".handshake.extensions_padding_data", \
1736 FT_BYTES, BASE_NONE, NULL, 0x0, \
1737 "Must be zero", HFILL } \
1738 }, \
1739 { & name .hf.hs_ext_cert_url_type, \
1740 { "Certificate Chain Type", prefix ".handshake.cert_url_type", \
1741 FT_UINT8, BASE_DEC, VALS(tls_cert_chain_type), 0x0, \
1742 "Certificate Chain Type for Client Certificate URL", HFILL } \
1743 }, \
1744 { & name .hf.hs_ext_cert_url_url_hash_list_len, \
1745 { "URL and Hash list Length", prefix ".handshake.cert_url.url_hash_len", \
1746 FT_UINT16, BASE_DEC, NULL, 0x0, \
1747 NULL, HFILL } \
1748 }, \
1749 { & name .hf.hs_ext_cert_url_item, \
1750 { "URL and Hash", prefix ".handshake.cert_url.url_hash", \
1751 FT_NONE, BASE_NONE, NULL, 0x0, \
1752 NULL, HFILL } \
1753 }, \
1754 { & name .hf.hs_ext_cert_url_url_len, \
1755 { "URL Length", prefix ".handshake.cert_url.url_len", \
1756 FT_UINT16, BASE_DEC, NULL, 0x0, \
1757 NULL, HFILL } \
1758 }, \
1759 { & name .hf.hs_ext_cert_type, \
1760 { "Certificate Type", prefix ".handshake.cert_type.type", \
1761 FT_UINT8, BASE_HEX, VALS(tls_certificate_type), 0x0, \
1762 NULL, HFILL } \
1763 }, \
1764 { & name .hf.hs_ext_cert_types, \
1765 { "Certificate Type List", prefix ".handshake.cert_type.types", \
1766 FT_NONE, BASE_NONE, NULL, 0x0, \
1767 NULL, HFILL } \
1768 }, \
1769 { & name .hf.hs_ext_cert_types_len, \
1770 { "Certificate Type List Length", prefix ".handshake.cert_type.types_len", \
1771 FT_UINT8, BASE_DEC, NULL, 0x0, \
1772 NULL, HFILL } \
1773 }, \
1774 { & name .hf.hs_ext_cert_url_url, \
1775 { "URL", prefix ".handshake.cert_url.url", \
1776 FT_STRING, BASE_NONE, NULL, 0x0, \
1777 "URL used to fetch the certificate(s)", HFILL } \
1778 }, \
1779 { & name .hf.hs_ext_cert_url_padding, \
1780 { "Padding", prefix ".handshake.cert_url.padding", \
1781 FT_NONE, BASE_NONE, NULL, 0x0, \
1782 "Padding that MUST be 0x01 for backwards compatibility", HFILL } \
1783 }, \
1784 { & name .hf.hs_ext_cert_url_sha1, \
1785 { "SHA1 Hash", prefix ".handshake.cert_url.sha1", \
1786 FT_BYTES, BASE_NONE, NULL, 0x0, \
1787 "SHA1 Hash of the certificate", HFILL } \
1788 }, \
1789 { & name .hf.hs_ext_cert_status_type, \
1790 { "Certificate Status Type", prefix ".handshake.extensions_status_request_type", \
1791 FT_UINT8, BASE_DEC, VALS(tls_cert_status_type), 0x0, \
1792 NULL, HFILL } \
1793 }, \
1794 { & name .hf.hs_ext_cert_status_request_len, \
1795 { "Certificate Status Length", prefix ".handshake.extensions_status_request_len", \
1796 FT_UINT16, BASE_DEC, NULL, 0x0, \
1797 NULL, HFILL } \
1798 }, \
1799 { & name .hf.hs_ext_cert_status_responder_id_list_len, \
1800 { "Responder ID list Length", prefix ".handshake.extensions_status_request_responder_ids_len", \
1801 FT_UINT16, BASE_DEC, NULL, 0x0, \
1802 NULL, HFILL } \
1803 }, \
1804 { & name .hf.hs_ext_cert_status_request_extensions_len, \
1805 { "Request Extensions Length", prefix ".handshake.extensions_status_request_exts_len", \
1806 FT_UINT16, BASE_DEC, NULL, 0x0, \
1807 NULL, HFILL } \
1808 }, \
1809 { & name .hf.hs_ext_cert_status_request_list_len, \
1810 { "Certificate Status List Length", prefix ".handshake.extensions_status_request_list_len", \
1811 FT_UINT16, BASE_DEC, NULL, 0x0, \
1812 "CertificateStatusRequestItemV2 list length", HFILL } \
1813 }, \
1814 { & name .hf.hs_ocsp_response_list_len, \
1815 { "OCSP Response List Length", prefix ".handshake.ocsp_response_list_len", \
1816 FT_UINT24, BASE_DEC, NULL, 0x0, \
1817 "OCSPResponseList length", HFILL } \
1818 }, \
1819 { & name .hf.hs_ocsp_response_len, \
1820 { "OCSP Response Length", prefix ".handshake.ocsp_response_len", \
1821 FT_UINT24, BASE_DEC, NULL, 0x0, \
1822 NULL, HFILL } \
1823 }, \
1824 { & name .hf.hs_sig_hash_alg_len, \
1825 { "Signature Hash Algorithms Length", prefix ".handshake.sig_hash_alg_len", \
1826 FT_UINT16, BASE_DEC, NULL, 0x0, \
1827 "Length of Signature Hash Algorithms", HFILL } \
1828 }, \
1829 { & name .hf.hs_sig_hash_algs, \
1830 { "Signature Algorithms", prefix ".handshake.sig_hash_algs", \
1831 FT_NONE, BASE_NONE, NULL, 0x0, \
1832 "List of supported Signature Algorithms", HFILL } \
1833 }, \
1834 { & name .hf.hs_sig_hash_alg, \
1835 { "Signature Algorithm", prefix ".handshake.sig_hash_alg", \
1836 FT_UINT16, BASE_HEX, VALS(tls13_signature_algorithm), 0x0, \
1837 NULL, HFILL } \
1838 }, \
1839 { & name .hf.hs_sig_hash_hash, \
1840 { "Signature Hash Algorithm Hash", prefix ".handshake.sig_hash_hash", \
1841 FT_UINT8, BASE_DEC, VALS(tls_hash_algorithm), 0x0, \
1842 "Hash algorithm (TLS 1.2)", HFILL } \
1843 }, \
1844 { & name .hf.hs_sig_hash_sig, \
1845 { "Signature Hash Algorithm Signature", prefix ".handshake.sig_hash_sig", \
1846 FT_UINT8, BASE_DEC, VALS(tls_signature_algorithm), 0x0, \
1847 "Signature algorithm (TLS 1.2)", HFILL } \
1848 }, \
1849 { & name .hf.hs_client_keyex_epms_len, \
1850 { "Encrypted PreMaster length", prefix ".handshake.epms_len", \
1851 FT_UINT16, BASE_DEC, NULL, 0x0, \
1852 "Length of encrypted PreMaster secret", HFILL } \
1853 }, \
1854 { & name .hf.hs_client_keyex_epms, \
1855 { "Encrypted PreMaster", prefix ".handshake.epms", \
1856 FT_BYTES, BASE_NONE, NULL, 0x0, \
1857 "Encrypted PreMaster secret", HFILL } \
1858 }, \
1859 { & name .hf.hs_server_keyex_modulus_len, \
1860 { "Modulus Length", prefix ".handshake.modulus_len", \
1861 FT_UINT16, BASE_DEC, NULL, 0x0, \
1862 "Length of RSA-EXPORT modulus", HFILL } \
1863 }, \
1864 { & name .hf.hs_server_keyex_exponent_len, \
1865 { "Exponent Length", prefix ".handshake.exponent_len", \
1866 FT_UINT16, BASE_DEC, NULL, 0x0, \
1867 "Length of RSA-EXPORT exponent", HFILL } \
1868 }, \
1869 { & name .hf.hs_server_keyex_sig_len, \
1870 { "Signature Length", prefix ".handshake.sig_len", \
1871 FT_UINT16, BASE_DEC, NULL, 0x0, \
1872 "Length of Signature", HFILL } \
1873 }, \
1874 { & name .hf.hs_server_keyex_p_len, \
1875 { "p Length", prefix ".handshake.p_len", \
1876 FT_UINT16, BASE_DEC, NULL, 0x0, \
1877 "Length of p", HFILL } \
1878 }, \
1879 { & name .hf.hs_server_keyex_g_len, \
1880 { "g Length", prefix ".handshake.g_len", \
1881 FT_UINT16, BASE_DEC, NULL, 0x0, \
1882 "Length of g", HFILL } \
1883 }, \
1884 { & name .hf.hs_server_keyex_ys_len, \
1885 { "Pubkey Length", prefix ".handshake.ys_len", \
1886 FT_UINT16, BASE_DEC, NULL, 0x0, \
1887 "Length of server's Diffie-Hellman public key", HFILL } \
1888 }, \
1889 { & name .hf.hs_client_keyex_yc_len, \
1890 { "Pubkey Length", prefix ".handshake.yc_len", \
1891 FT_UINT16, BASE_DEC, NULL, 0x0, \
1892 "Length of client's Diffie-Hellman public key", HFILL } \
1893 }, \
1894 { & name .hf.hs_client_keyex_point_len, \
1895 { "Pubkey Length", prefix ".handshake.client_point_len", \
1896 FT_UINT8, BASE_DEC, NULL, 0x0, \
1897 "Length of client's EC Diffie-Hellman public key", HFILL } \
1898 }, \
1899 { & name .hf.hs_server_keyex_point_len, \
1900 { "Pubkey Length", prefix ".handshake.server_point_len", \
1901 FT_UINT8, BASE_DEC, NULL, 0x0, \
1902 "Length of server's EC Diffie-Hellman public key", HFILL } \
1903 }, \
1904 { & name .hf.hs_server_keyex_p, \
1905 { "p", prefix ".handshake.p", \
1906 FT_BYTES, BASE_NONE, NULL, 0x0, \
1907 "Diffie-Hellman p", HFILL } \
1908 }, \
1909 { & name .hf.hs_server_keyex_g, \
1910 { "g", prefix ".handshake.g", \
1911 FT_BYTES, BASE_NONE, NULL, 0x0, \
1912 "Diffie-Hellman g", HFILL } \
1913 }, \
1914 { & name .hf.hs_server_keyex_curve_type, \
1915 { "Curve Type", prefix ".handshake.server_curve_type", \
1916 FT_UINT8, BASE_HEX, VALS(ssl_curve_types), 0x0, \
1917 "Server curve_type", HFILL } \
1918 }, \
1919 { & name .hf.hs_server_keyex_named_curve, \
1920 { "Named Curve", prefix ".handshake.server_named_curve", \
1921 FT_UINT16, BASE_HEX, VALS(ssl_extension_curves), 0x0, \
1922 "Server named_curve", HFILL } \
1923 }, \
1924 { & name .hf.hs_server_keyex_ys, \
1925 { "Pubkey", prefix ".handshake.ys", \
1926 FT_BYTES, BASE_NONE, NULL, 0x0, \
1927 "Diffie-Hellman server pubkey", HFILL } \
1928 }, \
1929 { & name .hf.hs_client_keyex_yc, \
1930 { "Pubkey", prefix ".handshake.yc", \
1931 FT_BYTES, BASE_NONE, NULL, 0x0, \
1932 "Diffie-Hellman client pubkey", HFILL } \
1933 }, \
1934 { & name .hf.hs_server_keyex_point, \
1935 { "Pubkey", prefix ".handshake.server_point", \
1936 FT_BYTES, BASE_NONE, NULL, 0x0, \
1937 "EC Diffie-Hellman server pubkey", HFILL } \
1938 }, \
1939 { & name .hf.hs_client_keyex_point, \
1940 { "Pubkey", prefix ".handshake.client_point", \
1941 FT_BYTES, BASE_NONE, NULL, 0x0, \
1942 "EC Diffie-Hellman client pubkey", HFILL } \
1943 }, \
1944 { & name .hf.hs_server_keyex_xs_len, \
1945 { "Pubkey Length", prefix ".handshake.xs_len", \
1946 FT_UINT8, BASE_DEC, NULL, 0x0, \
1947 "Length of EC J-PAKE server public key", HFILL } \
1948 }, \
1949 { & name .hf.hs_client_keyex_xc_len, \
1950 { "Pubkey Length", prefix ".handshake.xc_len", \
1951 FT_UINT8, BASE_DEC, NULL, 0x0, \
1952 "Length of EC J-PAKE client public key", HFILL } \
1953 }, \
1954 { & name .hf.hs_server_keyex_xs, \
1955 { "Pubkey", prefix ".handshake.xs", \
1956 FT_BYTES, BASE_NONE, NULL, 0x0, \
1957 "EC J-PAKE server public key", HFILL } \
1958 }, \
1959 { & name .hf.hs_client_keyex_xc, \
1960 { "Pubkey", prefix ".handshake.xc", \
1961 FT_BYTES, BASE_NONE, NULL, 0x0, \
1962 "EC J-PAKE client public key", HFILL } \
1963 }, \
1964 { & name .hf.hs_server_keyex_vs_len, \
1965 { "Ephemeral Pubkey Length", prefix ".handshake.vs_len", \
1966 FT_UINT8, BASE_DEC, NULL, 0x0, \
1967 "Length of EC J-PAKE server ephemeral public key", HFILL } \
1968 }, \
1969 { & name .hf.hs_client_keyex_vc_len, \
1970 { "Ephemeral Pubkey Length", prefix ".handshake.vc_len", \
1971 FT_UINT8, BASE_DEC, NULL, 0x0, \
1972 "Length of EC J-PAKE client ephemeral public key", HFILL } \
1973 }, \
1974 { & name .hf.hs_server_keyex_vs, \
1975 { "Ephemeral Pubkey", prefix ".handshake.vs", \
1976 FT_BYTES, BASE_NONE, NULL, 0x0, \
1977 "EC J-PAKE server ephemeral public key", HFILL } \
1978 }, \
1979 { & name .hf.hs_client_keyex_vc, \
1980 { "Ephemeral Pubkey", prefix ".handshake.vc", \
1981 FT_BYTES, BASE_NONE, NULL, 0x0, \
1982 "EC J-PAKE client ephemeral public key", HFILL } \
1983 }, \
1984 { & name .hf.hs_server_keyex_rs_len, \
1985 { "Schnorr signature Length", prefix ".handshake.rs_len", \
1986 FT_UINT8, BASE_DEC, NULL, 0x0, \
1987 "Length of EC J-PAKE server Schnorr signature", HFILL } \
1988 }, \
1989 { & name .hf.hs_client_keyex_rc_len, \
1990 { "Schnorr signature Length", prefix ".handshake.rc_len", \
1991 FT_UINT8, BASE_DEC, NULL, 0x0, \
1992 "Length of EC J-PAKE client Schnorr signature", HFILL } \
1993 }, \
1994 { & name .hf.hs_server_keyex_rs, \
1995 { "Schnorr signature", prefix ".handshake.rs", \
1996 FT_BYTES, BASE_NONE, NULL, 0x0, \
1997 "EC J-PAKE server Schnorr signature", HFILL } \
1998 }, \
1999 { & name .hf.hs_client_keyex_rc, \
2000 { "Schnorr signature", prefix ".handshake.rc", \
2001 FT_BYTES, BASE_NONE, NULL, 0x0, \
2002 "EC J-PAKE client Schnorr signature", HFILL } \
2003 }, \
2004 { & name .hf.hs_server_keyex_modulus, \
2005 { "Modulus", prefix ".handshake.modulus", \
2006 FT_BYTES, BASE_NONE, NULL, 0x0, \
2007 "RSA-EXPORT modulus", HFILL } \
2008 }, \
2009 { & name .hf.hs_server_keyex_exponent, \
2010 { "Exponent", prefix ".handshake.exponent", \
2011 FT_BYTES, BASE_NONE, NULL, 0x0, \
2012 "RSA-EXPORT exponent", HFILL } \
2013 }, \
2014 { & name .hf.hs_server_keyex_sig, \
2015 { "Signature", prefix ".handshake.sig", \
2016 FT_BYTES, BASE_NONE, NULL, 0x0, \
2017 "Diffie-Hellman server signature", HFILL } \
2018 }, \
2019 { & name .hf.hs_server_keyex_hint_len, \
2020 { "Hint Length", prefix ".handshake.hint_len", \
2021 FT_UINT16, BASE_DEC, NULL, 0x0, \
2022 "Length of PSK Hint", HFILL } \
2023 }, \
2024 { & name .hf.hs_server_keyex_hint, \
2025 { "Hint", prefix ".handshake.hint", \
2026 FT_BYTES, BASE_NONE, NULL, 0x0, \
2027 "PSK Hint", HFILL } \
2028 }, \
2029 { & name .hf.hs_client_keyex_identity_len, \
2030 { "Identity Length", prefix ".handshake.identity_len", \
2031 FT_UINT16, BASE_DEC, NULL, 0x0, \
2032 "Length of PSK Identity", HFILL } \
2033 }, \
2034 { & name .hf.hs_client_keyex_identity, \
2035 { "Identity", prefix ".handshake.identity", \
2036 FT_BYTES, BASE_NONE, NULL, 0x0, \
2037 "PSK Identity", HFILL } \
2038 }, \
2039 { & name .hf.hs_ext_heartbeat_mode, \
2040 { "Mode", prefix ".handshake.extension.heartbeat.mode", \
2041 FT_UINT8, BASE_DEC, VALS(tls_heartbeat_mode), 0x0, \
2042 "Heartbeat extension mode", HFILL } \
2043 }, \
2044 { & name .hf.hs_certificates_len, \
2045 { "Certificates Length", prefix ".handshake.certificates_length", \
2046 FT_UINT24, BASE_DEC, NULL, 0x0, \
2047 "Length of certificates field", HFILL } \
2048 }, \
2049 { & name .hf.hs_certificates, \
2050 { "Certificates", prefix ".handshake.certificates", \
2051 FT_NONE, BASE_NONE, NULL, 0x0, \
2052 "List of certificates", HFILL } \
2053 }, \
2054 { & name .hf.hs_certificate, \
2055 { "Certificate", prefix ".handshake.certificate", \
2056 FT_BYTES, BASE_NONE, NULL, 0x0, \
2057 NULL, HFILL } \
2058 }, \
2059 { & name .hf.hs_certificate_len, \
2060 { "Certificate Length", prefix ".handshake.certificate_length", \
2061 FT_UINT24, BASE_DEC, NULL, 0x0, \
2062 "Length of certificate", HFILL } \
2063 }, \
2064 { & name .hf.hs_cert_types_count, \
2065 { "Certificate types count", prefix ".handshake.cert_types_count",\
2066 FT_UINT8, BASE_DEC, NULL, 0x0, \
2067 "Count of certificate types", HFILL } \
2068 }, \
2069 { & name .hf.hs_cert_types, \
2070 { "Certificate types", prefix ".handshake.cert_types", \
2071 FT_NONE, BASE_NONE, NULL, 0x0, \
2072 "List of certificate types", HFILL } \
2073 }, \
2074 { & name .hf.hs_cert_type, \
2075 { "Certificate type", prefix ".handshake.cert_type", \
2076 FT_UINT8, BASE_DEC, VALS(ssl_31_client_certificate_type), 0x0, \
2077 NULL, HFILL } \
2078 }, \
2079 { & name .hf.hs_dnames_len, \
2080 { "Distinguished Names Length", prefix ".handshake.dnames_len", \
2081 FT_UINT16, BASE_DEC, NULL, 0x0, \
2082 "Length of list of CAs that server trusts", HFILL } \
2083 }, \
2084 { & name .hf.hs_dnames, \
2085 { "Distinguished Names", prefix ".handshake.dnames", \
2086 FT_NONE, BASE_NONE, NULL, 0x0, \
2087 "List of CAs that server trusts", HFILL } \
2088 }, \
2089 { & name .hf.hs_dname_len, \
2090 { "Distinguished Name Length", prefix ".handshake.dname_len", \
2091 FT_UINT16, BASE_DEC, NULL, 0x0, \
2092 "Length of distinguished name", HFILL } \
2093 }, \
2094 { & name .hf.hs_dnames_truncated, \
2095 { "Tree view truncated", prefix ".handshake.dnames_truncated", \
2096 FT_NONE, BASE_NONE, NULL, 0x00, \
2097 "Some Distinguished Names are not added to tree pane to limit resources", HFILL } \
2098 }, \
2099 { & name .hf.hs_dname, \
2100 { "Distinguished Name", prefix ".handshake.dname", \
2101 FT_NONE, BASE_NONE, NULL, 0x0, \
2102 "Distinguished name of a CA that server trusts", HFILL } \
2103 }, \
2104 { & name .hf.hs_random, \
2105 { "Random", prefix ".handshake.random", \
2106 FT_BYTES, BASE_NONE, NULL, 0x0, \
2107 "Random values used for deriving keys", HFILL } \
2108 }, \
2109 { & name .hf.hs_random_time, \
2110 { "GMT Unix Time", prefix ".handshake.random_time", \
2111 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x0, \
2112 "Unix time field of random structure", HFILL } \
2113 }, \
2114 { & name .hf.hs_random_bytes, \
2115 { "Random Bytes", prefix ".handshake.random_bytes", \
2116 FT_BYTES, BASE_NONE, NULL, 0x0, \
2117 "Random values used for deriving keys", HFILL } \
2118 }, \
2119 { & name .hf.hs_session_id, \
2120 { "Session ID", prefix ".handshake.session_id", \
2121 FT_BYTES, BASE_NONE, NULL, 0x0, \
2122 "Identifies the SSL session, allowing later resumption", HFILL }\
2123 }, \
2124 { & name .hf.hs_session_id_len, \
2125 { "Session ID Length", prefix ".handshake.session_id_length", \
2126 FT_UINT8, BASE_DEC, NULL, 0x0, \
2127 "Length of Session ID field", HFILL } \
2128 }, \
2129 { & name .hf.hs_client_version, \
2130 { "Version", prefix ".handshake.version", \
2131 FT_UINT16, BASE_HEX, VALS(ssl_versions), 0x0, \
2132 "Maximum version supported by client [legacy_version if supported_versions ext is present]", HFILL } \
2133 }, \
2134 { & name .hf.hs_server_version, \
2135 { "Version", prefix ".handshake.version", \
2136 FT_UINT16, BASE_HEX, VALS(ssl_versions), 0x0, \
2137 "Version selected by server [legacy_version if supported_versions ext is present]", HFILL } \
2138 }, \
2139 { & name .hf.hs_cipher_suites_len, \
2140 { "Cipher Suites Length", prefix ".handshake.cipher_suites_length", \
2141 FT_UINT16, BASE_DEC, NULL, 0x0, \
2142 "Length of cipher suites field", HFILL } \
2143 }, \
2144 { & name .hf.hs_cipher_suites, \
2145 { "Cipher Suites", prefix ".handshake.ciphersuites", \
2146 FT_NONE, BASE_NONE, NULL, 0x0, \
2147 "List of cipher suites supported by client", HFILL } \
2148 }, \
2149 { & name .hf.hs_cipher_suite, \
2150 { "Cipher Suite", prefix ".handshake.ciphersuite", \
2151 FT_UINT16, BASE_HEX|BASE_EXT_STRING, &ssl_31_ciphersuite_ext, 0x0, \
2152 NULL, HFILL } \
2153 }, \
2154 { & name .hf.hs_comp_methods_len, \
2155 { "Compression Methods Length", prefix ".handshake.comp_methods_length", \
2156 FT_UINT8, BASE_DEC, NULL, 0x0, \
2157 "Length of compression methods field", HFILL } \
2158 }, \
2159 { & name .hf.hs_comp_methods, \
2160 { "Compression Methods", prefix ".handshake.comp_methods", \
2161 FT_NONE, BASE_NONE, NULL, 0x0, \
2162 "List of compression methods supported by client", HFILL } \
2163 }, \
2164 { & name .hf.hs_comp_method, \
2165 { "Compression Method", prefix ".handshake.comp_method", \
2166 FT_UINT8, BASE_DEC, VALS(ssl_31_compression_method), 0x0, \
2167 NULL, HFILL } \
2168 }, \
2169 { & name .hf.hs_session_ticket_lifetime_hint, \
2170 { "Session Ticket Lifetime Hint", \
2171 prefix ".handshake.session_ticket_lifetime_hint", \
2172 FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_second_seconds), 0x0, \
2173 "New Session Ticket Lifetime Hint", HFILL } \
2174 }, \
2175 { & name .hf.hs_session_ticket_age_add, \
2176 { "Session Ticket Age Add", \
2177 prefix ".handshake.session_ticket_age_add", \
2178 FT_UINT32, BASE_DEC, NULL, 0x0, \
2179 "Random 32-bit value to obscure age of ticket", HFILL } \
2180 }, \
2181 { & name .hf.hs_session_ticket_nonce_len, \
2182 { "Session Ticket Nonce Length", prefix ".handshake.session_ticket_nonce_length", \
2183 FT_UINT8, BASE_DEC, NULL, 0x0, \
2184 NULL, HFILL } \
2185 }, \
2186 { & name .hf.hs_session_ticket_nonce, \
2187 { "Session Ticket Nonce", prefix ".handshake.session_ticket_nonce", \
2188 FT_BYTES, BASE_NONE, NULL, 0x0, \
2189 "A unique per-ticket value", HFILL } \
2190 }, \
2191 { & name .hf.hs_session_ticket_len, \
2192 { "Session Ticket Length", prefix ".handshake.session_ticket_length", \
2193 FT_UINT16, BASE_DEC, NULL, 0x0, \
2194 "New Session Ticket Length", HFILL } \
2195 }, \
2196 { & name .hf.hs_session_ticket, \
2197 { "Session Ticket", prefix ".handshake.session_ticket", \
2198 FT_BYTES, BASE_NONE, NULL, 0x0, \
2199 "New Session Ticket", HFILL } \
2200 }, \
2201 { & name .hf.hs_finished, \
2202 { "Verify Data", prefix ".handshake.verify_data", \
2203 FT_BYTES, BASE_NONE, NULL, 0x0, \
2204 "Opaque verification data", HFILL } \
2205 }, \
2206 { & name .hf.hs_client_cert_vrfy_sig_len, \
2207 { "Signature length", prefix ".handshake.client_cert_vrfy.sig_len", \
2208 FT_UINT16, BASE_DEC, NULL, 0x0, \
2209 "Length of CertificateVerify's signature", HFILL } \
2210 }, \
2211 { & name .hf.hs_client_cert_vrfy_sig, \
2212 { "Signature", prefix ".handshake.client_cert_vrfy.sig", \
2213 FT_BYTES, BASE_NONE, NULL, 0x0, \
2214 "CertificateVerify's signature", HFILL } \
2215 }, \
2216 { & name .hf.hs_ja3_full, \
2217 { "JA3 Fullstring", prefix ".handshake.ja3_full", \
2218 FT_STRING, BASE_NONE, NULL, 0x0, \
2219 NULL, HFILL } \
2220 }, \
2221 { & name .hf.hs_ja3_hash, \
2222 { "JA3", prefix ".handshake.ja3", \
2223 FT_STRING, BASE_NONE, NULL, 0x0, \
2224 NULL, HFILL } \
2225 }, \
2226 { & name .hf.hs_ja3s_full, \
2227 { "JA3S Fullstring", prefix ".handshake.ja3s_full", \
2228 FT_STRING, BASE_NONE, NULL, 0x0, \
2229 NULL, HFILL } \
2230 }, \
2231 { & name .hf.hs_ja3s_hash, \
2232 { "JA3S", prefix ".handshake.ja3s", \
2233 FT_STRING, BASE_NONE, NULL, 0x0, \
2234 NULL, HFILL } \
2235 }, \
2236 { & name .hf.hs_ja4, \
2237 { "JA4", prefix ".handshake.ja4", \
2238 FT_STRING, BASE_NONE, NULL, 0x0, \
2239 NULL, HFILL } \
2240 }, \
2241 { & name .hf.hs_ja4_r, \
2242 { "JA4_r", prefix ".handshake.ja4_r", \
2243 FT_STRING, BASE_NONE, NULL, 0x0, \
2244 NULL, HFILL } \
2245 }, \
2246 { & name .hf.hs_ext_psk_ke_modes_length, \
2247 { "PSK Key Exchange Modes Length", prefix ".extension.psk_ke_modes_length", \
2248 FT_UINT8, BASE_DEC, NULL, 0x0, \
2249 NULL, HFILL } \
2250 }, \
2251 { & name .hf.hs_ext_psk_ke_mode, \
2252 { "PSK Key Exchange Mode", prefix ".extension.psk_ke_mode", \
2253 FT_UINT8, BASE_DEC, VALS(tls_hello_ext_psk_ke_mode), 0x0, \
2254 "Key exchange modes where the client supports use of PSKs", HFILL } \
2255 }, \
2256 { & name .hf.hs_certificate_request_context_length, \
2257 { "Certificate Request Context Length", prefix ".handshake.certificate_request_context_length", \
2258 FT_UINT8, BASE_DEC, NULL, 0x0, \
2259 NULL, HFILL } \
2260 }, \
2261 { & name .hf.hs_certificate_request_context, \
2262 { "Certificate Request Context", prefix ".handshake.certificate_request_context", \
2263 FT_BYTES, BASE_NONE, NULL, 0x0, \
2264 "Value from CertificateRequest or empty for server auth", HFILL } \
2265 }, \
2266 { & name .hf.hs_key_update_request_update, \
2267 { "Key Update Request", prefix ".handshake.key_update.request_update", \
2268 FT_UINT8, BASE_DEC, VALS(tls13_key_update_request), 0x00, \
2269 "Whether the receiver should also update its keys", HFILL } \
2270 }, \
2271 { & name .hf.sct_scts_length, \
2272 { "Serialized SCT List Length", prefix ".sct.scts_length", \
2273 FT_UINT16, BASE_DEC, NULL, 0x00, \
2274 NULL, HFILL } \
2275 }, \
2276 { & name .hf.sct_sct_length, \
2277 { "Serialized SCT Length", prefix ".sct.sct_length", \
2278 FT_UINT16, BASE_DEC, NULL, 0x00, \
2279 NULL, HFILL } \
2280 }, \
2281 { & name .hf.sct_sct_version, \
2282 { "SCT Version", prefix ".sct.sct_version", \
2283 FT_UINT8, BASE_DEC, NULL, 0x00, \
2284 "SCT Protocol version (v1 (0) is defined in RFC 6962)", HFILL } \
2285 }, \
2286 { & name .hf.sct_sct_logid, \
2287 { "Log ID", prefix ".sct.sct_logid", \
2288 FT_BYTES, BASE_NONE, NULL, 0x00, \
2289 "SHA-256 hash of log's public key", HFILL } \
2290 }, \
2291 { & name .hf.sct_sct_timestamp, \
2292 { "Timestamp", prefix ".sct.sct_timestamp", \
2293 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0x00, \
2294 "Timestamp of issuance", HFILL } \
2295 }, \
2296 { & name .hf.sct_sct_extensions_length, \
2297 { "Extensions length", prefix ".sct.sct_extensions_length", \
2298 FT_UINT16, BASE_DEC, NULL, 0x00, \
2299 "Length of future extensions to this protocol (currently none)", HFILL } \
2300 }, \
2301 { & name .hf.sct_sct_extensions, \
2302 { "Extensions", prefix ".sct.sct_extensions", \
2303 FT_NONE, BASE_NONE, NULL, 0x00, \
2304 "Future extensions to this protocol (currently none)", HFILL } \
2305 }, \
2306 { & name .hf.sct_sct_signature_length, \
2307 { "Signature Length", prefix ".sct.sct_signature_length", \
2308 FT_UINT16, BASE_DEC, NULL, 0x00, \
2309 NULL, HFILL } \
2310 }, \
2311 { & name .hf.sct_sct_signature, \
2312 { "Signature", prefix ".sct.sct_signature", \
2313 FT_BYTES, BASE_NONE, NULL, 0x00, \
2314 NULL, HFILL } \
2315 }, \
2316 { & name .hf.hs_ext_max_early_data_size, \
2317 { "Maximum Early Data Size", prefix ".early_data.max_early_data_size", \
2318 FT_UINT32, BASE_DEC, NULL, 0x00, \
2319 "Maximum amount of 0-RTT data that the client may send", HFILL } \
2320 }, \
2321 { & name .hf.hs_ext_oid_filters_length, \
2322 { "OID Filters Length", prefix ".extension.oid_filters_length", \
2323 FT_UINT16, BASE_DEC, NULL, 0x00, \
2324 NULL, HFILL } \
2325 }, \
2326 { & name .hf.hs_ext_oid_filters_oid_length, \
2327 { "Certificate Extension OID Length", prefix ".extension.oid_filters.oid_length", \
2328 FT_UINT8, BASE_DEC, NULL, 0x00, \
2329 NULL, HFILL } \
2330 }, \
2331 { & name .hf.hs_ext_oid_filters_oid, \
2332 { "Certificate Extension OID", prefix ".extension.oid_filters.oid", \
2333 FT_OID, BASE_NONE, NULL, 0x00, \
2334 NULL, HFILL } \
2335 }, \
2336 { & name .hf.hs_ext_oid_filters_values_length, \
2337 { "Certificate Extension Values Length", prefix ".extension.oid_filters.values_length", \
2338 FT_UINT16, BASE_DEC, NULL, 0x00, \
2339 NULL, HFILL } \
2340 }, \
2341 { & name .hf.hs_cred_valid_time, \
2342 { "Valid Time", prefix ".handshake.cred.valid_time", \
2343 FT_UINT16, BASE_DEC, NULL, 0x0, \
2344 "Delegated Credentials Valid Time", HFILL } \
2345 }, \
2346 { & name .hf.hs_cred_pubkey, \
2347 { "Subject Public Key Info", prefix ".handshake.cred.pubkey", \
2348 FT_BYTES, BASE_NONE, NULL, 0x0, \
2349 "Delegated Credentials Subject Public Key Info", HFILL } \
2350 }, \
2351 { & name .hf.hs_cred_pubkey_len, \
2352 { "Subject Public Key Info Length", prefix ".handshake.cred.pubkey_len", \
2353 FT_UINT24, BASE_DEC, NULL, 0x0, \
2354 "Delegated Credentials Subject Public Key Info Length", HFILL } \
2355 }, \
2356 { & name .hf.hs_cred_signature, \
2357 { "Signature", prefix ".handshake.cred.signature", \
2358 FT_BYTES, BASE_NONE, NULL, 0x0, \
2359 "Delegated Credentials Signature", HFILL } \
2360 }, \
2361 { & name .hf.hs_cred_signature_len, \
2362 { "Signature Length", prefix ".handshake.cred.signature_len", \
2363 FT_UINT16, BASE_DEC, NULL, 0x0, \
2364 "Delegated Credentials Signature Length", HFILL } \
2365 }, \
2366 { & name .hf.hs_ext_compress_certificate_algorithms_length, \
2367 { "Algorithms Length", prefix ".compress_certificate.algorithms_length", \
2368 FT_UINT8, BASE_DEC, NULL, 0x00, \
2369 NULL, HFILL } \
2370 }, \
2371 { & name .hf.hs_ext_compress_certificate_algorithm, \
2372 { "Algorithm", prefix ".compress_certificate.algorithm", \
2373 FT_UINT16, BASE_DEC, VALS(compress_certificate_algorithm_vals), 0x00, \
2374 NULL, HFILL } \
2375 }, \
2376 { & name .hf.hs_ext_compress_certificate_uncompressed_length, \
2377 { "Uncompressed Length", prefix ".compress_certificate.uncompressed_length", \
2378 FT_UINT24, BASE_DEC, NULL, 0x00, \
2379 NULL, HFILL } \
2380 }, \
2381 { & name .hf.hs_ext_compress_certificate_compressed_certificate_message_length, \
2382 { "Length", prefix ".compress_certificate.compressed_certificate_message.length", \
2383 FT_UINT24, BASE_DEC, NULL, 0x00, \
2384 NULL, HFILL } \
2385 }, \
2386 { & name .hf.hs_ext_compress_certificate_compressed_certificate_message, \
2387 { "Compressed Certificate Message", prefix ".compress_certificate.compressed_certificate_message", \
2388 FT_BYTES, BASE_NONE, NULL, 0x00, \
2389 NULL, HFILL } \
2390 }, \
2391 { & name .hf.hs_ext_token_binding_version_major, \
2392 { "Protocol Major Version", prefix ".token_binding.version_major", \
2393 FT_UINT8, BASE_HEX, NULL, 0x00, \
2394 "Major version of the Token Binding protocol", HFILL } \
2395 }, \
2396 { & name .hf.hs_ext_token_binding_version_minor, \
2397 { "Protocol Minor Version", prefix ".token_binding.version_minor", \
2398 FT_UINT8, BASE_HEX, NULL, 0x00, \
2399 "Minor version of the Token Binding protocol", HFILL } \
2400 }, \
2401 { & name .hf.hs_ext_token_binding_key_parameters, \
2402 { "Key Parameters", prefix ".token_binding.key_parameters", \
2403 FT_NONE, BASE_NONE, NULL, 0x0, \
2404 NULL, HFILL } \
2405 }, \
2406 { & name .hf.hs_ext_token_binding_key_parameters_length, \
2407 { "Key Parameters Length", prefix ".token_binding.key_parameters_length", \
2408 FT_UINT8, BASE_DEC, NULL, 0x00, \
2409 "Length of the key parameters list", HFILL } \
2410 }, \
2411 { & name .hf.hs_ext_token_binding_key_parameter, \
2412 { "Key Parameter", prefix ".token_binding.key_parameter", \
2413 FT_UINT8, BASE_DEC, VALS(token_binding_key_parameter_vals), 0x00, \
2414 "Identifier of the Token Binding key parameter", HFILL } \
2415 }, \
2416 { & name .hf.hs_ext_record_size_limit, \
2417 { "Record Size Limit", prefix ".record_size_limit", \
2418 FT_UINT16, BASE_DEC, NULL, 0x00, \
2419 "Maximum record size that an endpoint is willing to receive", HFILL } \
2420 }, \
2421 { & name .hf.hs_ext_quictp_len, \
2422 { "Parameters Length", prefix ".quic.len", \
2423 FT_UINT16, BASE_DEC, NULL, 0x00, \
2424 NULL, HFILL } \
2425 }, \
2426 { & name .hf.hs_ext_quictp_parameter, \
2427 { "Parameter", prefix ".quic.parameter", \
2428 FT_NONE, BASE_NONE, NULL, 0x00, \
2429 NULL, HFILL } \
2430 }, \
2431 { & name .hf.hs_ext_quictp_parameter_type, \
2432 { "Type", prefix ".quic.parameter.type", \
2433 FT_UINT64, BASE_CUSTOM, CF_FUNC(quic_transport_parameter_id_base_custom), 0x00, \
2434 NULL, HFILL } \
2435 }, \
2436 { & name .hf.hs_ext_quictp_parameter_len, \
2437 { "Length", prefix ".quic.parameter.length", \
2438 FT_UINT64, BASE_DEC, NULL, 0x00, \
2439 NULL, HFILL } \
2440 }, \
2441 { & name .hf.hs_ext_quictp_parameter_len_old, \
2442 { "Length", prefix ".quic.parameter.length.old", \
2443 FT_UINT16, BASE_DEC, NULL, 0x00, \
2444 NULL, HFILL } \
2445 }, \
2446 { & name .hf.hs_ext_quictp_parameter_value, \
2447 { "Value", prefix ".quic.parameter.value", \
2448 FT_BYTES, BASE_NONE, NULL, 0x00, \
2449 NULL, HFILL } \
2450 }, \
2451 { & name .hf.hs_ext_quictp_parameter_original_destination_connection_id, \
2452 { "original_destination_connection_id", prefix ".quic.parameter.original_destination_connection_id", \
2453 FT_BYTES, BASE_NONE, NULL, 0x00, \
2454 "Destination Connection ID from the first Initial packet sent by the client", HFILL } \
2455 }, \
2456 { & name .hf.hs_ext_quictp_parameter_max_idle_timeout, \
2457 { "max_idle_timeout", prefix ".quic.parameter.max_idle_timeout", \
2458 FT_UINT64, BASE_DEC, NULL, 0x00, \
2459 "In milliseconds", HFILL } \
2460 }, \
2461 { & name .hf.hs_ext_quictp_parameter_stateless_reset_token, \
2462 { "stateless_reset_token", prefix ".quic.parameter.stateless_reset_token", \
2463 FT_BYTES, BASE_NONE, NULL, 0x00, \
2464 "Used in verifying a stateless reset", HFILL } \
2465 }, \
2466 { & name .hf.hs_ext_quictp_parameter_max_udp_payload_size, \
2467 { "max_udp_payload_size", prefix ".quic.parameter.max_udp_payload_size", \
2468 FT_UINT64, BASE_DEC, NULL, 0x00, \
2469 "Maximum UDP payload size that the endpoint is willing to receive", HFILL } \
2470 }, \
2471 { & name .hf.hs_ext_quictp_parameter_initial_max_data, \
2472 { "initial_max_data", prefix ".quic.parameter.initial_max_data", \
2473 FT_UINT64, BASE_DEC, NULL, 0x00, \
2474 "Contains the initial value for the maximum amount of data that can be sent on the connection", HFILL } \
2475 }, \
2476 { & name .hf.hs_ext_quictp_parameter_initial_max_stream_data_bidi_local, \
2477 { "initial_max_stream_data_bidi_local", prefix ".quic.parameter.initial_max_stream_data_bidi_local", \
2478 FT_UINT64, BASE_DEC, NULL, 0x00, \
2479 "Initial stream maximum data for bidirectional, locally-initiated streams", HFILL } \
2480 }, \
2481 { & name .hf.hs_ext_quictp_parameter_initial_max_stream_data_bidi_remote, \
2482 { "initial_max_stream_data_bidi_remote", prefix ".quic.parameter.initial_max_stream_data_bidi_remote", \
2483 FT_UINT64, BASE_DEC, NULL, 0x00, \
2484 "Initial stream maximum data for bidirectional, peer-initiated streams", HFILL } \
2485 }, \
2486 { & name .hf.hs_ext_quictp_parameter_initial_max_stream_data_uni, \
2487 { "initial_max_stream_data_uni", prefix ".quic.parameter.initial_max_stream_data_uni", \
2488 FT_UINT64, BASE_DEC, NULL, 0x00, \
2489 "Initial stream maximum data for unidirectional streams parameter", HFILL } \
2490 }, \
2491 { & name .hf.hs_ext_quictp_parameter_initial_max_streams_bidi, \
2492 { "initial_max_streams_bidi", prefix ".quic.parameter.initial_max_streams_bidi", \
2493 FT_UINT64, BASE_DEC, NULL, 0x00, \
2494 "Initial maximum number of application-owned bidirectional streams", HFILL } \
2495 }, \
2496 { & name .hf.hs_ext_quictp_parameter_initial_max_streams_uni, \
2497 { "initial_max_streams_uni", prefix ".quic.parameter.initial_max_streams_uni", \
2498 FT_UINT64, BASE_DEC, NULL, 0x00, \
2499 "Initial maximum number of application-owned unidirectional streams", HFILL } \
2500 }, \
2501 { & name .hf.hs_ext_quictp_parameter_ack_delay_exponent, \
2502 { "ack_delay_exponent", prefix ".quic.parameter.ack_delay_exponent", \
2503 FT_UINT64, BASE_DEC, NULL, 0x00, \
2504 "Indicating an exponent used to decode the ACK Delay field in the ACK frame,", HFILL } \
2505 }, \
2506 { & name .hf.hs_ext_quictp_parameter_max_ack_delay, \
2507 { "max_ack_delay", prefix ".quic.parameter.max_ack_delay", \
2508 FT_UINT64, BASE_DEC, NULL, 0x00, \
2509 "Indicating the maximum amount of time in milliseconds by which it will delay sending of acknowledgments", HFILL } \
2510 }, \
2511 { & name .hf.hs_ext_quictp_parameter_pa_ipv4address, \
2512 { "ipv4Address", prefix ".quic.parameter.preferred_address.ipv4address", \
2513 FT_IPv4, BASE_NONE, NULL, 0x00, \
2514 NULL, HFILL } \
2515 }, \
2516 { & name .hf.hs_ext_quictp_parameter_pa_ipv6address, \
2517 { "ipv6Address", prefix ".quic.parameter.preferred_address.ipv6address", \
2518 FT_IPv6, BASE_NONE, NULL, 0x00, \
2519 NULL, HFILL } \
2520 }, \
2521 { & name .hf.hs_ext_quictp_parameter_pa_ipv4port, \
2522 { "ipv4Port", prefix ".quic.parameter.preferred_address.ipv4port", \
2523 FT_UINT16, BASE_DEC, NULL, 0x00, \
2524 NULL, HFILL } \
2525 }, \
2526 { & name .hf.hs_ext_quictp_parameter_pa_ipv6port, \
2527 { "ipv6Port", prefix ".quic.parameter.preferred_address.ipv6port", \
2528 FT_UINT16, BASE_DEC, NULL, 0x00, \
2529 NULL, HFILL } \
2530 }, \
2531 { & name .hf.hs_ext_quictp_parameter_pa_connectionid_length, \
2532 { "Length", prefix ".quic.parameter.preferred_address.connectionid.length", \
2533 FT_UINT8, BASE_DEC, NULL, 0x00, \
2534 "Length of connectionId Field", HFILL } \
2535 }, \
2536 { & name .hf.hs_ext_quictp_parameter_pa_connectionid, \
2537 { "connectionId", prefix ".quic.parameter.preferred_address.connectionid", \
2538 FT_BYTES, BASE_NONE, NULL, 0x00, \
2539 NULL, HFILL } \
2540 }, \
2541 { & name .hf.hs_ext_quictp_parameter_pa_statelessresettoken, \
2542 { "statelessResetToken", prefix ".quic.parameter.preferred_address.statelessresettoken", \
2543 FT_BYTES, BASE_NONE, NULL, 0x00, \
2544 NULL, HFILL } \
2545 }, \
2546 { & name .hf.hs_ext_quictp_parameter_active_connection_id_limit, \
2547 { "Active Connection ID Limit", prefix ".quic.parameter.active_connection_id_limit", \
2548 FT_UINT64, BASE_DEC, NULL, 0x00, \
2549 NULL, HFILL } \
2550 }, \
2551 { & name .hf.hs_ext_quictp_parameter_initial_source_connection_id, \
2552 { "Initial Source Connection ID", prefix ".quic.parameter.initial_source_connection_id", \
2553 FT_BYTES, BASE_NONE, NULL, 0x00, \
2554 NULL, HFILL } \
2555 }, \
2556 { & name .hf.hs_ext_quictp_parameter_retry_source_connection_id, \
2557 { "Retry Source Connection ID", prefix ".quic.parameter.retry_source_connection_id", \
2558 FT_BYTES, BASE_NONE, NULL, 0x00, \
2559 NULL, HFILL } \
2560 }, \
2561 { & name .hf.hs_ext_quictp_parameter_max_datagram_frame_size, \
2562 { "max_datagram_frame_size", prefix ".quic.parameter.max_datagram_frame_size", \
2563 FT_UINT64, BASE_DEC, NULL, 0x00, \
2564 NULL, HFILL } \
2565 }, \
2566 { & name .hf.hs_ext_quictp_parameter_cibir_encoding_length, \
2567 { "length", prefix ".quic.parameter.cibir_encoding.length", \
2568 FT_UINT64, BASE_DEC, NULL, 0x00, \
2569 NULL, HFILL } \
2570 }, \
2571 { & name .hf.hs_ext_quictp_parameter_cibir_encoding_offset, \
2572 { "offset", prefix ".quic.parameter.cibir_encoding.offset", \
2573 FT_UINT64, BASE_DEC, NULL, 0x00, \
2574 NULL, HFILL } \
2575 }, \
2576 { & name .hf.hs_ext_quictp_parameter_loss_bits, \
2577 { "loss_bits", prefix ".quic.parameter.loss_bits", \
2578 FT_UINT64, BASE_DEC, NULL, 0x00, \
2579 NULL, HFILL } \
2580 }, \
2581 { & name .hf.hs_ext_quictp_parameter_address_discovery, \
2582 { "address_discovery", prefix ".quic.parameter.address_discovery", \
2583 FT_UINT64, BASE_DEC|BASE_VAL64_STRING, VALS64(quic_address_discovery_vals), 0x00, \
2584 NULL, HFILL } \
2585 }, \
2586 { & name .hf.hs_ext_quictp_parameter_enable_time_stamp_v2, \
2587 { "Enable TimestampV2", prefix ".quic.parameter.enable_time_stamp_v2", \
2588 FT_UINT64, BASE_DEC|BASE_VAL64_STRING, VALS64(quic_enable_time_stamp_v2_vals), 0x00, \
2589 NULL, HFILL } \
2590 }, \
2591 { & name .hf.hs_ext_quictp_parameter_min_ack_delay, \
2592 { "min_ack_delay", prefix ".quic.parameter.min_ack_delay", \
2593 FT_UINT64, BASE_DEC, NULL, 0x00, \
2594 NULL, HFILL } \
2595 }, \
2596 { & name .hf.hs_ext_quictp_parameter_google_user_agent_id, \
2597 { "Google UserAgent", prefix ".quic.parameter.google.user_agent", \
2598 FT_STRING, BASE_NONE, NULL, 0x00, \
2599 NULL, HFILL } \
2600 }, \
2601 { & name .hf.hs_ext_quictp_parameter_google_key_update_not_yet_supported, \
2602 { "Google Key Update not yet supported", prefix ".quic.parameter.google.key_update_not_yet_supported", \
2603 FT_NONE, BASE_NONE, NULL, 0x00, \
2604 NULL, HFILL } \
2605 }, \
2606 { & name .hf.hs_ext_quictp_parameter_google_quic_version, \
2607 { "Google QUIC version", prefix ".quic.parameter.google.quic_version", \
2608 FT_UINT32, BASE_RANGE_STRING | BASE_HEX, RVALS(quic_version_vals), 0x00, \
2609 NULL, HFILL } \
2610 }, \
2611 { & name .hf.hs_ext_quictp_parameter_google_initial_rtt, \
2612 { "Google Initial RTT", prefix ".quic.parameter.google.initial_rtt", \
2613 FT_UINT64, BASE_DEC, NULL, 0x00, \
2614 NULL, HFILL } \
2615 }, \
2616 { & name .hf.hs_ext_quictp_parameter_google_support_handshake_done, \
2617 { "Google Support Handshake Done", prefix ".quic.parameter.google.support_handshake_done", \
2618 FT_NONE, BASE_NONE, NULL, 0x00, \
2619 NULL, HFILL } \
2620 }, \
2621 { & name .hf.hs_ext_quictp_parameter_google_quic_params, \
2622 { "Google QUIC parameters", prefix ".quic.parameter.google.quic_params", \
2623 FT_BYTES, BASE_NONE, NULL, 0x00, \
2624 NULL, HFILL } \
2625 }, \
2626 { & name .hf.hs_ext_quictp_parameter_google_quic_params_unknown_field, \
2627 { "Google Unknown Field", prefix ".quic.parameter.google.quic_params_unknown_field", \
2628 FT_BYTES, BASE_NONE, NULL, 0x00, \
2629 NULL, HFILL } \
2630 }, \
2631 { & name .hf.hs_ext_quictp_parameter_google_connection_options, \
2632 { "Google Connection options", prefix ".quic.parameter.google.connection_options", \
2633 FT_BYTES, BASE_NONE, NULL, 0x00, \
2634 NULL, HFILL } \
2635 }, \
2636 { & name .hf.hs_ext_quictp_parameter_google_supported_versions_length, \
2637 { "Google Supported Versions Length", prefix ".quic.parameter.google.supported_versions_length", \
2638 FT_UINT8, BASE_DEC, NULL, 0x00, \
2639 NULL, HFILL } \
2640 }, \
2641 { & name .hf.hs_ext_quictp_parameter_google_supported_version, \
2642 { "Google Supported Version", prefix ".quic.parameter.google.supported_version", \
2643 FT_UINT32, BASE_RANGE_STRING | BASE_HEX, RVALS(quic_version_vals), 0x00, \
2644 NULL, HFILL } \
2645 }, \
2646 { & name .hf.hs_ext_quictp_parameter_facebook_partial_reliability, \
2647 { "Facebook Partial Reliability", prefix ".quic.parameter.facebook.partial_reliability", \
2648 FT_UINT64, BASE_DEC, NULL, 0x00, \
2649 NULL, HFILL } \
2650 }, \
2651 { & name .hf.hs_ext_quictp_parameter_chosen_version, \
2652 { "Chosen Version", prefix ".quic.parameter.vi.chosen_version", \
2653 FT_UINT32, BASE_RANGE_STRING | BASE_HEX, RVALS(quic_version_vals), 0x00, \
2654 NULL, HFILL } \
2655 }, \
2656 { & name .hf.hs_ext_quictp_parameter_other_version, \
2657 { "Other Version", prefix ".quic.parameter.vi.other_version", \
2658 FT_UINT32, BASE_RANGE_STRING | BASE_HEX, RVALS(quic_version_vals), 0x00, \
2659 NULL, HFILL } \
2660 }, \
2661 { & name .hf.hs_ext_quictp_parameter_enable_multipath, \
2662 { "Enable Multipath", prefix ".quic.parameter.enable_multipath", \
2663 FT_UINT64, BASE_DEC|BASE_VAL64_STRING, VALS64(quic_enable_multipath_vals), 0x00, \
2664 NULL, HFILL } \
2665 }, \
2666 { & name .hf.hs_ext_quictp_parameter_initial_max_paths, \
2667 { "Initial Max Paths", prefix ".quic.parameter.initial_max_paths", \
2668 FT_UINT64, BASE_DEC, NULL, 0x00, \
2669 NULL, HFILL } \
2670 }, \
2671 { & name .hf.hs_ext_quictp_parameter_initial_max_path_id, \
2672 { "Initial Max Path ID", prefix ".quic.parameter.initial_max_path_id", \
2673 FT_UINT64, BASE_DEC, NULL, 0x00, \
2674 NULL, HFILL } \
2675 }, \
2676 { & name .hf.hs_ext_connection_id_length, \
2677 { "Connection ID length", prefix ".connection_id_length", \
2678 FT_UINT8, BASE_DEC, NULL, 0x00, \
2679 NULL, HFILL } \
2680 }, \
2681 { & name .hf.hs_ext_connection_id, \
2682 { "Connection ID", prefix ".connection_id", \
2683 FT_BYTES, BASE_NONE, NULL, 0x00, \
2684 NULL, HFILL } \
2685 }, \
2686 { & name .hf.hs_ext_trusted_ca_keys_len, \
2687 { "Trusted CA keys length", prefix ".handshake.trusted_ca.keys_length", \
2688 FT_UINT16, BASE_DEC, NULL, 0x00, \
2689 "Length of Trusted CA keys extension", HFILL } \
2690 }, \
2691 { & name .hf.hs_ext_trusted_ca_keys_list, \
2692 { "Trusted CA keys", prefix ".handshake.trusted_ca.keys", \
2693 FT_NONE, BASE_NONE, NULL, 0x00, \
2694 "List of Trusted CA keys", HFILL } \
2695 }, \
2696 { & name .hf.hs_ext_trusted_ca_key, \
2697 { "Trusted CA key", prefix ".handshake.trusted_ca.key", \
2698 FT_NONE, BASE_NONE, NULL, 0x0, \
2699 NULL, HFILL } \
2700 }, \
2701 { & name .hf.hs_ext_trusted_ca_key_type, \
2702 { "Trusted CA key type", prefix ".handshake.trusted_ca.key_type", \
2703 FT_UINT8, BASE_DEC, VALS(tls_hello_ext_trusted_ca_key_type), 0x00, \
2704 "Type of Trusted CA key", HFILL } \
2705 }, \
2706 { & name .hf.hs_ext_trusted_ca_key_hash, \
2707 { "Trusted CA key hash", prefix ".handshake.trusted_ca.key_hash", \
2708 FT_BYTES, BASE_NONE, NULL, 0x00, \
2709 NULL, HFILL } \
2710 }, \
2711 { & name .hf.hs_ext_trusted_ca_key_dname_len, \
2712 { "Distinguished Name Length", prefix ".handshake.trusted_ca.key_dname_len", \
2713 FT_UINT16, BASE_DEC, NULL, 0x0, \
2714 "Length of distinguished name", HFILL } \
2715 }, \
2716 { & name .hf.hs_ext_trusted_ca_key_dname, \
2717 { "Distinguished Name", prefix ".handshake.trusted_ca.key_dname", \
2718 FT_NONE, BASE_NONE, NULL, 0x0, \
2719 "Distinguished name of a CA that the client trusts", HFILL } \
2720 }, \
2721 { & name .hf.esni_suite, \
2722 { "Cipher Suite", prefix ".esni.suite", \
2723 FT_UINT16, BASE_HEX|BASE_EXT_STRING, &ssl_31_ciphersuite_ext, 0x0, \
2724 "Cipher suite used to encrypt the SNI", HFILL } \
2725 }, \
2726 { & name .hf.esni_record_digest_length, \
2727 { "Record Digest Length", prefix ".esni.record_digest_length", \
2728 FT_UINT16, BASE_DEC, NULL, 0x00, \
2729 NULL, HFILL } \
2730 }, \
2731 { & name .hf.esni_record_digest, \
2732 { "Record Digest", prefix ".esni.record_digest", \
2733 FT_BYTES, BASE_NONE, NULL, 0x00, \
2734 "Cryptographic hash of the ESNIKeys from which the ESNI key was obtained", HFILL } \
2735 }, \
2736 { & name .hf.esni_encrypted_sni_length, \
2737 { "Encrypted SNI Length", prefix ".esni.encrypted_sni_length", \
2738 FT_UINT16, BASE_DEC, NULL, 0x00, \
2739 NULL, HFILL } \
2740 }, \
2741 { & name .hf.esni_encrypted_sni, \
2742 { "Encrypted SNI", prefix ".esni.encrypted_sni", \
2743 FT_BYTES, BASE_NONE, NULL, 0x00, \
2744 "The encrypted ClientESNIInner structure", HFILL } \
2745 }, \
2746 { & name .hf.esni_nonce, \
2747 { "Nonce", prefix ".esni.nonce", \
2748 FT_BYTES, BASE_NONE, NULL, 0x00, \
2749 "Contents of ClientESNIInner.nonce", HFILL } \
2750 }, \
2751 { & name .hf.ech_echconfiglist_length, \
2752 { "ECHConfigList length", prefix ".ech.echconfiglist_length", \
2753 FT_UINT16, BASE_DEC, NULL, 0x0, \
2754 "Encrypted ClientHello (ECH) Configurations length", HFILL } \
2755 }, \
2756 { & name .hf.ech_echconfiglist, \
2757 { "ECHConfigList", prefix ".ech.echconfiglist", \
2758 FT_NONE, BASE_NONE, NULL, 0x0, \
2759 "Encrypted ClientHello (ECH) Configurations", HFILL } \
2760 }, \
2761 { & name .hf.ech_echconfig, \
2762 { "ECHConfig", prefix ".ech.echconfig", \
2763 FT_NONE, BASE_NONE, NULL, 0x0, \
2764 "Encrypted ClientHello (ECH) Configuration", HFILL } \
2765 }, \
2766 { & name .hf.ech_echconfig_version, \
2767 { "Version", prefix ".ech.echconfig.version", \
2768 FT_UINT16, BASE_HEX, NULL, 0x0, \
2769 "Encrypted ClientHello: ECHConfig version", HFILL } \
2770 }, \
2771 { & name .hf.ech_echconfig_length, \
2772 { "Length", prefix ".ech.echconfig.length", \
2773 FT_UINT16, BASE_DEC, NULL, 0x0, \
2774 "Encrypted ClientHello: ECHConfig length", HFILL } \
2775 }, \
2776 { & name .hf.ech_echconfigcontents_maximum_name_length, \
2777 { "Maximum Name Length", prefix ".ech.echconfigcontents.maximum_name_length", \
2778 FT_UINT8, BASE_DEC, NULL, 0x0, \
2779 "The longest name of a backend server, if known", HFILL } \
2780 }, \
2781 { & name .hf.ech_echconfigcontents_public_name_length, \
2782 { "Public Name length", prefix ".ech.echconfigcontents.public_name_length", \
2783 FT_UINT8, BASE_DEC, NULL, 0x0, \
2784 "Length of the Public Name field", HFILL } \
2785 }, \
2786 { & name .hf.ech_echconfigcontents_public_name, \
2787 { "Public Name", prefix ".ech.echconfigcontents.public_name", \
2788 FT_STRING, BASE_NONE, NULL, 0x0, \
2789 "The DNS name of the client-facing server, i.e., the entity trusted to update the ECH configuration", HFILL } \
2790 }, \
2791 { & name .hf.ech_echconfigcontents_extensions_length, \
2792 { "Extensions length", prefix ".ech.echconfigcontents.extensions_length", \
2793 FT_UINT16, BASE_DEC, NULL, 0x0, \
2794 "Length of the Extensions field", HFILL } \
2795 }, \
2796 { & name .hf.ech_echconfigcontents_extensions, \
2797 { "Extensions", prefix ".ech.echconfigcontents.extensions", \
2798 FT_BYTES, BASE_NONE, NULL, 0x0, \
2799 "A list of extensions that the client must take into consideration when generating a ClientHello message", HFILL } \
2800 }, \
2801 { & name .hf.ech_hpke_keyconfig, \
2802 { "HPKE Key Config", prefix ".ech.hpke.keyconfig", \
2803 FT_NONE, BASE_NONE, NULL, 0x0, \
2804 "HPKE Key Config", HFILL } \
2805 }, \
2806 { & name .hf.ech_hpke_keyconfig_config_id, \
2807 { "Config Id", prefix ".ech.hpke.keyconfig.config_id", \
2808 FT_UINT8, BASE_DEC, NULL, 0x0, \
2809 "HPKE Config Id", HFILL } \
2810 }, \
2811 { & name .hf.ech_hpke_keyconfig_kem_id, \
2812 { "KEM Id", prefix ".ech.hpke.keyconfig.kem_id", \
2813 FT_UINT16, BASE_DEC, VALS(kem_id_type_vals), 0x0, \
2814 "HPKE KEM Id", HFILL } \
2815 }, \
2816 { & name .hf.ech_hpke_keyconfig_public_key_length, \
2817 { "Public Key length", prefix ".ech.hpke.keyconfig.public_key_length", \
2818 FT_UINT16, BASE_DEC, NULL, 0x0, \
2819 "HPKE Public Key length", HFILL } \
2820 }, \
2821 { & name .hf.ech_hpke_keyconfig_public_key, \
2822 { "Public Key", prefix ".ech.hpke.keyconfig.public_key", \
2823 FT_BYTES, BASE_NONE, NULL, 0x0, \
2824 "HPKE Public Key", HFILL } \
2825 }, \
2826 { & name .hf.ech_hpke_keyconfig_cipher_suites, \
2827 { "Cipher Suites", prefix ".ech.hpke.keyconfig.cipher_suites", \
2828 FT_NONE, BASE_NONE, NULL, 0x0, \
2829 "HPKE Cipher Suites", HFILL } \
2830 }, \
2831 { & name .hf.ech_hpke_keyconfig_cipher_suites_length, \
2832 { "Cipher Suites length", prefix ".ech.hpke.keyconfig.cipher_suites_length", \
2833 FT_UINT16, BASE_DEC, NULL, 0x0, \
2834 "HPKE Cipher Suites length", HFILL } \
2835 }, \
2836 { & name .hf.ech_hpke_keyconfig_cipher_suite, \
2837 { "Cipher Suite", prefix ".ech.hpke.keyconfig.cipher_suite", \
2838 FT_NONE, BASE_NONE, NULL, 0x0, \
2839 "HPKE Cipher Suite", HFILL } \
2840 }, \
2841 { & name .hf.ech_hpke_keyconfig_cipher_suite_kdf_id, \
2842 { "KDF Id", prefix ".ech.hpke.keyconfig.cipher_suite.kdf_id", \
2843 FT_UINT16, BASE_DEC, VALS(kdf_id_type_vals), 0x0, \
2844 "HPKE KDF Id", HFILL } \
2845 }, \
2846 { & name .hf.ech_hpke_keyconfig_cipher_suite_aead_id, \
2847 { "AEAD Id", prefix ".ech.hpke.keyconfig.cipher_suite.aead_id", \
2848 FT_UINT16, BASE_DEC, VALS(aead_id_type_vals), 0x0, \
2849 "HPKE AEAD Id", HFILL } \
2850 }, \
2851 { & name .hf.ech_clienthello_type, \
2852 { "Client Hello type", prefix ".ech.client_hello_type", \
2853 FT_UINT8, BASE_DEC, VALS(tls_hello_ext_ech_clienthello_types), 0x0, \
2854 "Client Hello type", HFILL } \
2855 }, \
2856 { & name .hf.ech_cipher_suite, \
2857 { "Cipher Suite", prefix ".ech.cipher_suite", \
2858 FT_NONE, BASE_NONE, NULL, 0x0, \
2859 "The cipher suite used to encrypt ClientHelloInner", HFILL } \
2860 }, \
2861 { & name .hf.ech_config_id, \
2862 { "Config Id", prefix ".ech.config_id", \
2863 FT_UINT8, BASE_DEC, NULL, 0x0, \
2864 "The ECHConfigContents.key_config.config_id for the chosen ECHConfig", HFILL } \
2865 }, \
2866 { & name .hf.ech_enc_length, \
2867 { "Enc length", prefix ".ech.enc_length", \
2868 FT_UINT16, BASE_DEC, NULL, 0x0, \
2869 NULL, HFILL } \
2870 }, \
2871 { & name .hf.ech_enc, \
2872 { "Enc", prefix ".ech.enc", \
2873 FT_BYTES, BASE_NONE, NULL, 0x0, \
2874 "The HPKE encapsulated key, used by servers to decrypt the corresponding payload field", HFILL } \
2875 }, \
2876 { & name .hf.ech_payload_length, \
2877 { "Payload length", prefix ".ech.payload_length", \
2878 FT_UINT16, BASE_DEC, NULL, 0x0, \
2879 "Payload Length", HFILL } \
2880 }, \
2881 { & name .hf.ech_payload, \
2882 { "Payload", prefix ".ech.payload", \
2883 FT_BYTES, BASE_NONE, NULL, 0x0, \
2884 "The serialized and encrypted ClientHelloInner structure", HFILL } \
2885 }, \
2886 { & name .hf.ech_confirmation, \
2887 { "Confirmation", prefix ".ech.confirmation", \
2888 FT_BYTES, BASE_NONE, NULL, 0x0, \
2889 "Confirmation of ECH acceptance in a HelloRetryRequest", HFILL } \
2890 }, \
2891 { & name .hf.ech_retry_configs, \
2892 { "Retry Configs", prefix ".ech.retry_configs", \
2893 FT_NONE, BASE_NONE, NULL, 0x0, \
2894 "ECHConfig structures for one-time use by the client in a retry connection", HFILL } \
2895 }, \
2896 { & name .hf.ech_padding_data, \
2897 { "ECH Encrypted Padding", prefix ".ech.encrypted_padding", \
2898 FT_BYTES, BASE_NONE, NULL, 0x0, \
2899 "Must be zero", HFILL } \
2900 }, \
2901 { & name .hf.hs_ext_alps_len, \
2902 { "ALPS Extension Length", prefix ".handshake.extensions_alps_len", \
2903 FT_UINT16, BASE_DEC, NULL, 0x0, \
2904 "Length of the ALPS Extension", HFILL } \
2905 }, \
2906 { & name .hf.hs_ext_alps_alpn_list, \
2907 { "Supported ALPN List", prefix ".handshake.extensions_alps_alpn_list", \
2908 FT_NONE, BASE_NONE, NULL, 0x0, \
2909 "List of supported ALPN by ALPS", HFILL } \
2910 }, \
2911 { & name .hf.hs_ext_alps_alpn_str_len, \
2912 { "Supported ALPN Length", prefix ".handshake.extensions_alps_alpn_str_len", \
2913 FT_UINT8, BASE_DEC, NULL, 0x0, \
2914 "Length of ALPN string", HFILL } \
2915 }, \
2916 { & name .hf.hs_ext_alps_alpn_str, \
2917 { "Supported ALPN", prefix ".handshake.extensions_alps_alpn_str", \
2918 FT_STRING, BASE_NONE, NULL, 0x00, \
2919 "ALPN supported by ALPS", HFILL } \
2920 }, \
2921 { & name .hf.hs_ext_alps_settings, \
2922 { "ALPN Opaque Settings", prefix ".handshake.extensions_alps.settings", \
2923 FT_BYTES, BASE_NONE, NULL, 0x00, \
2924 "ALPN Opaque Settings", HFILL } \
2925 }
2926/* }}} */
2927
2928/* {{{ */
2929#define SSL_COMMON_ETT_LIST(name) \
2930 & name .ett.hs_ext, \
2931 & name .ett.hs_ext_alpn, \
2932 & name .ett.hs_ext_cert_types, \
2933 & name .ett.hs_ext_groups, \
2934 & name .ett.hs_ext_curves_point_formats, \
2935 & name .ett.hs_ext_npn, \
2936 & name .ett.hs_ext_reneg_info, \
2937 & name .ett.hs_ext_key_share, \
2938 & name .ett.hs_ext_key_share_ks, \
2939 & name .ett.hs_ext_pre_shared_key, \
2940 & name .ett.hs_ext_psk_identity, \
2941 & name .ett.hs_ext_psk_binders, \
2942 & name .ett.hs_ext_psk_binder, \
2943 & name .ett.hs_ext_server_name, \
2944 & name .ett.hs_ext_oid_filter, \
2945 & name .ett.hs_ext_quictp_parameter, \
2946 & name .ett.hs_ext_trusted_ca_keys, \
2947 & name .ett.hs_ext_trusted_ca_key, \
2948 & name .ett.hs_sig_hash_alg, \
2949 & name .ett.hs_sig_hash_algs, \
2950 & name .ett.urlhash, \
2951 & name .ett.keyex_params, \
2952 & name .ett.certificates, \
2953 & name .ett.cert_types, \
2954 & name .ett.dnames, \
2955 & name .ett.hs_random, \
2956 & name .ett.cipher_suites, \
2957 & name .ett.comp_methods, \
2958 & name .ett.session_ticket, \
2959 & name .ett.sct, \
2960 & name .ett.cert_status, \
2961 & name .ett.ocsp_response, \
2962 & name .ett.uncompressed_certificates, \
2963 & name .ett.hs_ext_alps, \
2964 & name .ett.ech_echconfiglist, \
2965 & name .ett.ech_echconfig, \
2966 & name .ett.ech_retry_configs, \
2967 & name .ett.ech_hpke_keyconfig, \
2968 & name .ett.ech_hpke_cipher_suites, \
2969 & name .ett.ech_hpke_cipher_suite, \
2970 & name .ett.ech_decrypt, \
2971 & name .ett.hs_ext_token_binding_key_parameters, \
2972
2973/* }}} */
2974
2975/* {{{ */
2976#define SSL_COMMON_EI_LIST(name, prefix) \
2977 { & name .ei.client_version_error, \
2978 { prefix ".handshake.client_version_error", PI_PROTOCOL, PI_WARN, \
2979 "Client Hello legacy version field specifies version 1.3, not version 1.2; some servers may not be able to handle that.", EXPFILL } \
2980 }, \
2981 { & name .ei.server_version_error, \
2982 { prefix ".handshake.server_version_error", PI_PROTOCOL, PI_WARN, \
2983 "Server Hello legacy version field specifies version 1.3, not version 1.2; some middleboxes may not be able to handle that.", EXPFILL } \
2984 }, \
2985 { & name .ei.legacy_version, \
2986 { prefix ".handshake.legacy_version", PI_DEPRECATED, PI_CHAT, \
2987 "This legacy_version field MUST be ignored. The supported_versions extension is present and MUST be used instead.", EXPFILL } \
2988 }, \
2989 { & name .ei.malformed_vector_length, \
2990 { prefix ".malformed.vector_length", PI_PROTOCOL, PI_WARN, \
2991 "Variable vector length is outside the permitted range", EXPFILL } \
2992 }, \
2993 { & name .ei.malformed_buffer_too_small, \
2994 { prefix ".malformed.buffer_too_small", PI_MALFORMED, PI_ERROR, \
2995 "Malformed message, not enough data is available", EXPFILL } \
2996 }, \
2997 { & name .ei.malformed_trailing_data, \
2998 { prefix ".malformed.trailing_data", PI_PROTOCOL, PI_WARN, \
2999 "Undecoded trailing data is present", EXPFILL } \
3000 }, \
3001 { & name .ei.hs_ext_cert_status_undecoded, \
3002 { prefix ".handshake.status_request.undecoded", PI_UNDECODED, PI_NOTE, \
3003 "Responder ID list or Request Extensions are not implemented", EXPFILL } \
3004 }, \
3005 { & name .ei.hs_ciphersuite_undecoded, \
3006 { prefix ".handshake.ciphersuite.undecoded", PI_UNDECODED, PI_NOTE, \
3007 "Ciphersuite not implemented", EXPFILL } \
3008 }, \
3009 { & name .ei.hs_srv_keyex_illegal, \
3010 { prefix ".handshake.server_keyex_illegal", PI_PROTOCOL, PI_WARN, \
3011 "It is not legal to send the ServerKeyExchange message for this ciphersuite", EXPFILL } \
3012 }, \
3013 { & name .ei.resumed, \
3014 { prefix ".resumed", PI_SEQUENCE, PI_NOTE, \
3015 "This session reuses previously negotiated keys (Session resumption)", EXPFILL } \
3016 }, \
3017 { & name .ei.record_length_invalid, \
3018 { prefix ".record.length.invalid", PI_PROTOCOL, PI_ERROR, \
3019 "Record fragment length is too small or too large", EXPFILL } \
3020 }, \
3021 { & name .ei.decompression_error, \
3022 { prefix ".decompression_error", PI_PROTOCOL, PI_ERROR, \
3023 "Decompression error", EXPFILL } \
3024 }, \
3025 { & name .ei.ech_echconfig_invalid_version, \
3026 { prefix ".ech_echconfig_invalid_version", PI_PROTOCOL, PI_ERROR, \
3027 "Invalid/unknown ECHConfig version", EXPFILL } \
3028 }, \
3029 { & name .ei.ech_accepted, \
3030 { prefix ".ech_accepted", PI_PROTOCOL, PI_NOTE, \
3031 "Calculated ECH Confirmation matches Server Random bytes, ECH was accepted", EXPFILL } \
3032 }, \
3033 { & name .ei.ech_rejected, \
3034 { prefix ".ech_rejected", PI_PROTOCOL, PI_WARN, \
3035 "Calculated ECH Confirmation does not match Server Random bytes, ECH was rejected", EXPFILL } \
3036 }
3037/* }}} */
3038
3039extern void
3040ssl_common_register_ssl_alpn_dissector_table(const char *name,
3041 const char *ui_name, const int proto);
3042
3043extern void
3044ssl_common_register_dtls_alpn_dissector_table(const char *name,
3045 const char *ui_name, const int proto);
3046
3047extern void
3048ssl_common_register_options(module_t *module, ssl_common_options_t *options, bool is_dtls);
3049
3050#ifdef SSL_DECRYPT_DEBUG
3051extern void
3052ssl_debug_printf(const char* fmt,...) G_GNUC_PRINTF(1,2);
3053extern void
3054ssl_print_data(const char* name, const unsigned char* data, size_t len);
3055extern void
3056ssl_print_string(const char* name, const StringInfo* data);
3057extern void
3058ssl_set_debug(const char* name);
3059extern void
3060ssl_debug_flush(void);
3061#else
3062
3063/* No debug: nullify debug operation*/
3064static inline void G_GNUC_PRINTF(1,2)
3065ssl_debug_printf(const char* fmt _U_,...)
3066{
3067}
3068#define ssl_print_data(a, b, c)
3069#define ssl_print_string(a, b)
3070#define ssl_set_debug(name)
3071#define ssl_debug_flush()
3072
3073#endif /* SSL_DECRYPT_DEBUG */
3074
3075
3076uint32_t
3077ssl_dissect_ext_ech_echconfiglist(ssl_common_dissect_t *hf, tvbuff_t *tvb, packet_info *pinfo,
3078 proto_tree *tree, uint32_t offset, uint32_t offset_end);
3079
3080#endif /* __PACKET_TLS_UTILS_H__ */
3081
3082/*
3083 * Editor modelines - https://www.wireshark.org/tools/modelines.html
3084 *
3085 * Local variables:
3086 * c-basic-offset: 4
3087 * tab-width: 8
3088 * indent-tabs-mode: nil
3089 * End:
3090 *
3091 * vi: set shiftwidth=4 tabstop=8 expandtab:
3092 * :indentSize=4:tabSize=8:noTabs=true:
3093 */
struct _address address
Holds a network or link-layer address of any supported type.
port_type
Transport-layer port number types recognized by Wireshark.
Definition address.h:425
struct conversation conversation_t
struct epan_dissect epan_dissect_t
Opaque type representing a single packet dissection context.
Definition epan.h:62
struct _packet_info packet_info
Represents the metadata and indexing information for a single captured frame.
proto_node proto_item
Definition proto.h:952
struct _wmem_array_t wmem_array_t
Opaque type representing a dynamically resizable array in the wmem system.
Definition wmem_array.h:42
struct _wmem_list_t wmem_list_t
Opaque type representing a scoped, doubly-linked list in the wmem system.
Definition wmem_list.h:42
struct _wmem_tree_t wmem_tree_t
Opaque type representing a red-black tree in the wmem system.
Definition wmem_tree.h:49
struct _wmem_allocator_t wmem_allocator_t
Definition wmem_core.h:44
Definition packet-tls-utils.h:341
Definition packet-tls-utils.h:357
StringInfo dtls13_aad
Definition packet-tls-utils.h:368
StringInfo app_traffic_secret
Definition packet-tls-utils.h:371
uint64_t seq
Definition packet-tls-utils.h:367
Definition packet-tls-utils.c:2058
Definition packet-tls-utils.h:548
Definition packet-tls-utils.h:349
Definition packet-tls-utils.h:433
SslFlow * flow
Definition packet-tls-utils.h:443
uint64_t record_seq
Definition packet-tls-utils.h:445
uint32_t seq
Definition packet-tls-utils.h:446
unsigned content_len
Definition packet-tls-utils.h:438
unsigned plain_data_len
Definition packet-tls-utils.h:435
int id
Definition packet-tls-utils.h:440
ContentType type
Definition packet-tls-utils.h:442
unsigned char * plain_data
Definition packet-tls-utils.h:434
Definition packet-tls-utils.h:474
Definition packet-tls-utils.h:265
Definition packet-tls-utils.h:454
unsigned reassembly_id
Definition packet-tls-utils.h:457
uint8_t type
Definition packet-tls-utils.h:459
int is_last
Definition packet-tls-utils.h:460
uint32_t offset
Definition packet-tls-utils.h:458
unsigned record_id
Definition packet-tls-utils.h:455
Definition packet-tls-utils.h:599
Definition packet-tls-utils.h:541
Definition packet-tls-utils.h:428
Definition packet-tls-utils.h:464
uint32_t srcport
Definition packet-tls-utils.h:467
SslRecordInfo * records
Definition packet-tls-utils.h:465
int cipher
Definition packet-tls-utils.h:470
TlsHsFragment * hs_fragments
Definition packet-tls-utils.h:466
uint32_t stream
Definition packet-tls-utils.h:469
Definition packet-tls-utils.h:593
Definition conversation.h:284
Definition packet-tls-utils.h:1300
Pairs an expert info index with its associated header field index for registration and display.
Definition expert.h:41
Definition packet-tls-utils.h:1315
Definition packet-tls-utils.h:923
Definition packet-tls-utils.h:607
Definition packet-tls-utils.h:1308
Definition packet-tls-utils.h:613
tap_packet_status
Definition tap.h:22
struct _val64_string val64_string
Mapping between a 64-bit integer value and its string representation.
struct _value_string value_string
Mapping between a 32-bit integer value and its string representation.
struct _range_string range_string
Maps an inclusive numeric range to a string value, used for table-driven range-to-string lookups.