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