Wireshark 4.7.3
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
packet-tls.h
1/* packet-tls.h
2 *
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <[email protected]>
5 * Copyright 1998 Gerald Combs
6 *
7 *
8 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
10
11#ifndef __PACKET_TLS_H__
12#define __PACKET_TLS_H__
13
14#include "ws_symbol_export.h"
15#include <epan/packet.h>
16
17/* Opaque structure; the details are defined in packet-tls-utils.h */
18typedef struct _SslDecryptSession SslDecryptSession;
19
20struct tlsinfo {
21 uint32_t seq; /* The sequence number within the TLS stream. */
22 bool is_reassembled;
23 bool end_of_stream; /* TCP FIN, close_notify, etc. */
24 /* The app handle for the session, set by heuristic dissectors
25 * to be called in the future. */
26 dissector_handle_t *app_handle;
27};
28
29WS_DLL_PUBLIC void ssl_dissector_add(unsigned port, dissector_handle_t handle);
30WS_DLL_PUBLIC void ssl_dissector_delete(unsigned port, dissector_handle_t handle);
31
32WS_DLL_PUBLIC void ssl_set_master_secret(uint32_t frame_num, address *addr_srv, address *addr_cli,
33 port_type ptype, uint32_t port_srv, uint32_t port_cli,
34 uint32_t version, int cipher, const unsigned char *_master_secret,
35 const unsigned char *_client_random, const unsigned char *_server_random,
36 uint32_t client_seq, uint32_t server_seq);
37
51extern SslDecryptSession *
52tls_get_current_session(packet_info *pinfo);
53
65extern SslDecryptSession *
66tls_get_parent_session(packet_info *pinfo);
67
74extern bool
75tls_get_cipher_info(SslDecryptSession *tls_session, uint16_t cipher_suite, int *cipher_algo, int *cipher_mode, int *hash_algo);
76
81bool
82tls13_exporter(SslDecryptSession *tls_session, bool is_early,
83 const char *label, uint8_t *context,
84 unsigned context_length, unsigned key_length, unsigned char **out);
85
86int
87tls13_get_quic_secret(packet_info *pinfo, bool is_from_server, int type, unsigned secret_min_len, unsigned secret_max_len, uint8_t *secret_out);
88
98const char *
99tls_get_alpn(SslDecryptSession *tls_session);
100
109const char *
110tls_get_client_alpn(SslDecryptSession *tls_session);
111
112extern uint32_t
113tls_increment_stream_count(void);
114
115#endif /* __PACKET_TLS_H__ */
struct _address address
Holds a network or link-layer address of any supported type.
port_type
Transport-layer port number types recognized by Wireshark.
Definition address.h:425
struct _packet_info packet_info
Represents the metadata and indexing information for a single captured frame.
Definition packet-tls-utils.h:535
Definition packet-tls.h:20