Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
secrets.h
Go to the documentation of this file.
1
12#ifndef __SECRETS_H__
13#define __SECRETS_H__
14
15#include <inttypes.h>
16#include <stdbool.h>
17
18#include <glib.h>
19#include "ws_symbol_export.h"
20
21#ifdef __cplusplus
22extern "C" {
23#endif /* __cplusplus */
24
40void secrets_init(void);
41void secrets_cleanup(void);
42
43#if 0
50enum secrets_scope {
51 SECRETS_SCOPE_EPAN,
52 SECRETS_SCOPE_FILE,
53};
54#endif
55
56#ifdef HAVE_LIBGNUTLS
58struct cert_key_id {
59 uint8_t key_id[20];
60};
61typedef struct cert_key_id cert_key_id_t;
62#endif /* HAVE_LIBGNUTLS */
63
64
68WS_DLL_PUBLIC void
69secrets_wtap_callback(uint32_t secrets_type, const void *secrets, unsigned size);
70
74typedef void (*secrets_block_callback_t)(const void *secrets, unsigned size);
75
83WS_DLL_PUBLIC void
84secrets_register_type(uint32_t secrets_type, secrets_block_callback_t cb);
85
86#ifdef HAVE_LIBGNUTLS
93WS_DLL_PUBLIC GSList *
94secrets_get_available_keys(void);
95
105WS_DLL_PUBLIC bool
106secrets_verify_key(const char *uri, const char *password, bool *need_password, char **error);
107
109GHashTable *privkey_hash_table_new(void);
110
123WS_DLL_PUBLIC int
124secrets_rsa_decrypt(const cert_key_id_t *key_id, const uint8_t *encr, int encr_len, uint8_t **out, int *out_len);
125#endif /* HAVE_LIBGNUTLS */
126
127#ifdef __cplusplus
128}
129#endif /* __cplusplus */
130
131#endif /* __SECRETS_H__ */
WS_DLL_PUBLIC void secrets_wtap_callback(uint32_t secrets_type, const void *secrets, unsigned size)
Definition secrets.c:101
void(* secrets_block_callback_t)(const void *secrets, unsigned size)
Definition secrets.h:74
void secrets_init(void)
Definition secrets.c:70
WS_DLL_PUBLIC void secrets_register_type(uint32_t secrets_type, secrets_block_callback_t cb)
Definition secrets.c:95