Wireshark  4.3.0
The Wireshark network protocol analyzer
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
22 extern "C" {
23 #endif /* __cplusplus */
24 
40 void secrets_init(void);
41 void secrets_cleanup(void);
42 
43 #if 0
50 enum secrets_scope {
51  SECRETS_SCOPE_EPAN,
52  SECRETS_SCOPE_FILE,
53 };
54 #endif
55 
56 #ifdef HAVE_LIBGNUTLS
58 struct cert_key_id {
59  uint8_t key_id[20];
60 };
61 typedef struct cert_key_id cert_key_id_t;
62 #endif /* HAVE_LIBGNUTLS */
63 
64 
68 WS_DLL_PUBLIC void
69 secrets_wtap_callback(uint32_t secrets_type, const void *secrets, unsigned size);
70 
74 typedef void (*secrets_block_callback_t)(const void *secrets, unsigned size);
75 
83 WS_DLL_PUBLIC void
84 secrets_register_type(uint32_t secrets_type, secrets_block_callback_t cb);
85 
86 #ifdef HAVE_LIBGNUTLS
93 WS_DLL_PUBLIC GSList *
94 secrets_get_available_keys(void);
95 
105 WS_DLL_PUBLIC bool
106 secrets_verify_key(const char *uri, const char *password, bool *need_password, char **error);
107 
109 GHashTable *privkey_hash_table_new(void);
110 
123 WS_DLL_PUBLIC int
124 secrets_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