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 <glib.h>
16 #include "ws_symbol_export.h"
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif /* __cplusplus */
21 
37 void secrets_init(void);
38 void secrets_cleanup(void);
39 
40 #if 0
47 enum secrets_scope {
48  SECRETS_SCOPE_EPAN,
49  SECRETS_SCOPE_FILE,
50 };
51 #endif
52 
53 #ifdef HAVE_LIBGNUTLS
55 struct cert_key_id {
56  guint8 key_id[20];
57 };
58 typedef struct cert_key_id cert_key_id_t;
59 #endif /* HAVE_LIBGNUTLS */
60 
61 
65 WS_DLL_PUBLIC void
66 secrets_wtap_callback(guint32 secrets_type, const void *secrets, guint size);
67 
71 typedef void (*secrets_block_callback_t)(const void *secrets, guint size);
72 
80 void secrets_register_type(guint32 secrets_type, secrets_block_callback_t cb);
81 
82 #ifdef HAVE_LIBGNUTLS
89 WS_DLL_PUBLIC GSList *
90 secrets_get_available_keys(void);
91 
101 WS_DLL_PUBLIC gboolean
102 secrets_verify_key(const char *uri, const char *password, gboolean *need_password, char **error);
103 
105 GHashTable *privkey_hash_table_new(void);
106 
119 WS_DLL_PUBLIC int
120 secrets_rsa_decrypt(const cert_key_id_t *key_id, const guint8 *encr, int encr_len, guint8 **out, int *out_len);
121 #endif /* HAVE_LIBGNUTLS */
122 
123 #ifdef __cplusplus
124 }
125 #endif /* __cplusplus */
126 
127 #endif /* __SECRETS_H__ */
void secrets_init(void)
Definition: secrets.c:70
void secrets_register_type(guint32 secrets_type, secrets_block_callback_t cb)
Definition: secrets.c:95
void(* secrets_block_callback_t)(const void *secrets, guint size)
Definition: secrets.h:71
WS_DLL_PUBLIC void secrets_wtap_callback(guint32 secrets_type, const void *secrets, guint size)
Definition: secrets.c:101