OpenVPN
pkcs11_backend.h
Go to the documentation of this file.
1 /*
2  * OpenVPN -- An application to securely tunnel IP networks
3  * over a single TCP/UDP port, with support for SSL/TLS-based
4  * session authentication and key exchange,
5  * packet encryption, packet authentication, and
6  * packet compression.
7  *
8  * Copyright (C) 2002-2018 OpenVPN Inc <sales@openvpn.net>
9  * Copyright (C) 2010-2018 Fox Crypto B.V. <openvpn@fox-it.com>
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License version 2
13  * as published by the Free Software Foundation.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License along
21  * with this program; if not, write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23  */
24 
29 #ifndef PKCS11_BACKEND_H_
30 #define PKCS11_BACKEND_H_
31 
32 #include "syshead.h"
33 
34 #if defined(ENABLE_PKCS11)
35 
36 #include "ssl_common.h"
37 
38 #include <pkcs11-helper-1.0/pkcs11h-certificate.h>
39 
48 char *pkcs11_certificate_dn(pkcs11h_certificate_t certificate, struct gc_arena *gc);
49 
59 int pkcs11_certificate_serial(pkcs11h_certificate_t certificate, char *serial,
60  size_t serial_len);
61 
70 int pkcs11_init_tls_session(pkcs11h_certificate_t certificate,
71  struct tls_root_ctx *const ssl_ctx);
72 
73 #endif /* defined(ENABLE_PKCS11) */
74 #endif /* PKCS11_BACKEND_H_ */
Structure that wraps the TLS context.
Definition: ssl_mbedtls.h:90
Garbage collection arena used to keep track of dynamically allocated memory.
Definition: buffer.h:116