Wireshark  2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
rsa.h
1 /* rsa.h
2  *
3  * Functions for RSA private key reading and use
4  *
5  * Wireshark - Network traffic analyzer
6  * By Gerald Combs <gerald@wireshark.org>
7  * Copyright 2007 Gerald Combs
8  *
9  * SPDX-License-Identifier: GPL-2.0-or-later
10  */
11 
12 #ifndef __RSA_H__
13 #define __RSA_H__
14 
15 #include "ws_symbol_export.h"
16 #include "wsgcrypt.h"
17 
18 #ifdef HAVE_LIBGNUTLS
19 #include <stdio.h>
20 #include <gnutls/abstract.h>
21 WS_DLL_PUBLIC gcry_sexp_t rsa_privkey_to_sexp(gnutls_x509_privkey_t priv_key, char **err);
22 
29 WS_DLL_PUBLIC gnutls_x509_privkey_t rsa_load_pem_key(FILE* fp, char **err);
30 
38 WS_DLL_PUBLIC gnutls_x509_privkey_t rsa_load_pkcs12(FILE* fp, const char *cert_passwd, char** err);
39 #endif
40 
41 WS_DLL_PUBLIC void rsa_private_key_free(gpointer key);
42 
43 
44 #endif /* __RSA_H__ */