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
17
18#ifdef USE_OPENSSL
21#endif
22
23#ifdef USE_MBEDTLS
24#include <mbedtls/platform.h>
25#include <mbedtls/debug.h> // for debug_set_threshold
29#endif
30
31namespace openvpn::SSLLib {
32#ifdef USE_MBEDTLS
33#define SSL_LIB_NAME "MbedTLS"
34typedef MbedTLSContext SSLAPI;
35typedef MbedTLSPEM PEMAPI;
36#elif defined(USE_OPENSSL)
37#define SSL_LIB_NAME "OpenSSL"
38using CryptoAPI = OpenSSLCryptoAPI;
39using SSLAPI = OpenSSLContext;
40using PEMAPI = OpenSSLPEM;
41#else
42#error no SSL library defined
43#endif
44} // namespace openvpn::SSLLib
45
46#endif