OpenVPN 3 Core Library
Loading...
Searching...
No Matches
sslchoose.hpp
Go to the documentation of this file.
1
// OpenVPN -- An application to securely tunnel IP networks
2
// over a single port, with support for SSL/TLS-based
3
// session authentication and key exchange,
4
// packet encryption, packet authentication, and
5
// packet compression.
6
//
7
// Copyright (C) 2012- OpenVPN Inc.
8
//
9
// SPDX-License-Identifier: MPL-2.0 OR AGPL-3.0-only WITH openvpn3-openssl-exception
10
//
11
12
#ifndef OPENVPN_SSL_SSLCHOOSE_H
13
#define OPENVPN_SSL_SSLCHOOSE_H
14
15
#include <
openvpn/crypto/definitions.hpp
>
16
#include <
openvpn/crypto/cryptochoose.hpp
>
17
18
#ifdef USE_OPENSSL
19
#include <
openvpn/openssl/ssl/sslctx.hpp
>
20
#include <
openvpn/openssl/util/pem.hpp
>
21
#endif
22
23
#ifdef USE_APPLE_SSL
24
#include <
openvpn/applecrypto/crypto/api.hpp
>
25
#include <
openvpn/applecrypto/ssl/sslctx.hpp
>
26
#endif
27
28
#ifdef USE_MBEDTLS
29
#include <mbedtls/platform.h>
30
#include <mbedtls/debug.h>
// for debug_set_threshold
31
#include <
openvpn/mbedtls/crypto/api.hpp
>
32
#include <
openvpn/mbedtls/ssl/sslctx.hpp
>
33
#include <
openvpn/mbedtls/util/pem.hpp
>
34
#endif
35
36
#ifdef USE_MBEDTLS_APPLE_HYBRID
37
#include <
openvpn/applecrypto/crypto/api.hpp
>
38
#include <
openvpn/mbedtls/ssl/sslctx.hpp
>
39
#endif
40
41
namespace
openvpn::SSLLib
{
42
#if defined(USE_MBEDTLS)
43
#define SSL_LIB_NAME "MbedTLS"
44
typedef
MbedTLSContext SSLAPI;
45
typedef
MbedTLSPEM PEMAPI;
46
#elif defined(USE_MBEDTLS_APPLE_HYBRID)
47
// Uses Apple framework for CryptoAPI and MbedTLS for SSLAPI and RandomAPI
48
#define SSL_LIB_NAME "MbedTLSAppleHybrid"
49
typedef
AppleCryptoAPI CryptoAPI;
50
typedef
MbedTLSContext SSLAPI;
51
#elif defined(USE_APPLE_SSL)
52
#define SSL_LIB_NAME "AppleSSL"
53
typedef
AppleCryptoAPI CryptoAPI;
54
typedef
AppleSSLContext SSLAPI;
55
#elif defined(USE_OPENSSL)
56
#define SSL_LIB_NAME "OpenSSL"
57
typedef
OpenSSLCryptoAPI CryptoAPI;
58
typedef
OpenSSLContext SSLAPI;
59
typedef
OpenSSLPEM PEMAPI;
60
#else
61
#error no SSL library defined
62
#endif
63
}
// namespace openvpn::SSLLib
64
65
#endif
api.hpp
sslctx.hpp
cryptochoose.hpp
definitions.hpp
api.hpp
sslctx.hpp
pem.hpp
openvpn::SSLLib
Definition
cryptochoose.hpp:42
sslctx.hpp
pem.hpp
openvpn
ssl
sslchoose.hpp
Generated by
1.9.8