OpenVPN 3 Core Library
Loading...
Searching...
No Matches
sslconsts.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_SSLCONSTS_H
13
#define OPENVPN_SSL_SSLCONSTS_H
14
15
namespace
openvpn::SSLConst
{
16
17
// Special return values from SSL read/write methods
18
enum
19
{
20
// Indicates that no cleartext data is available now (until
21
// more ciphertext is pushed into the SSL engine).
22
SHOULD_RETRY
= -1,
23
24
// Return value from read_cleartext indicating that peer
25
// has sent a Close Notify message.
26
PEER_CLOSE_NOTIFY
= -2,
27
};
28
29
// SSL config flags
30
enum
31
{
32
// Show SSL status and cert chain in verify method
33
LOG_VERIFY_STATUS
= (1 << 0),
34
35
// Disable peer verification
36
NO_VERIFY_PEER
= (1 << 1),
37
38
// [client only] Enable client-side SNI (Server Name Indication)
39
// when hostname is provided
40
ENABLE_CLIENT_SNI
= (1 << 2),
41
42
// [client only] Don't require that the hostname matches
43
// the common name in the certificate.
44
NO_VERIFY_HOSTNAME
= (1 << 3),
45
46
// [server only] Don't automatically fail connections on
47
// bad peer cert. Succeed the connection, but pass the
48
// fail status data via AuthCert so the higher layers
49
// can handle it.
50
DEFERRED_CERT_VERIFY
= (1 << 4),
51
52
// [server only] When running as a server, require that
53
// clients that connect to us have their certificate
54
// purpose set to server.
55
SERVER_TO_SERVER
= (1 << 5),
56
57
// Peer certificate is optional
58
PEER_CERT_OPTIONAL
= (1 << 6),
59
60
// [server only] Send a list of client CAs to the client
61
SEND_CLIENT_CA_LIST
= (1 << 7),
62
63
// Verify peer by fingerprint, makes CA optional
64
VERIFY_PEER_FINGERPRINT
= (1 << 8),
65
66
// last flag marker
67
LAST
= (1 << 9)
68
};
69
70
// filter all but SSL flags
71
inline
unsigned
int
ssl_flags
(
const
unsigned
int
flags
)
72
{
73
return
flags
& (
LAST
- 1);
74
}
75
}
// namespace openvpn::SSLConst
76
77
#endif
openvpn::SSLConst
Definition
sslconsts.hpp:15
openvpn::SSLConst::ssl_flags
unsigned int ssl_flags(const unsigned int flags)
Definition
sslconsts.hpp:71
openvpn::SSLConst::PEER_CLOSE_NOTIFY
@ PEER_CLOSE_NOTIFY
Definition
sslconsts.hpp:26
openvpn::SSLConst::SHOULD_RETRY
@ SHOULD_RETRY
Definition
sslconsts.hpp:22
openvpn::SSLConst::NO_VERIFY_PEER
@ NO_VERIFY_PEER
Definition
sslconsts.hpp:36
openvpn::SSLConst::SERVER_TO_SERVER
@ SERVER_TO_SERVER
Definition
sslconsts.hpp:55
openvpn::SSLConst::VERIFY_PEER_FINGERPRINT
@ VERIFY_PEER_FINGERPRINT
Definition
sslconsts.hpp:64
openvpn::SSLConst::SEND_CLIENT_CA_LIST
@ SEND_CLIENT_CA_LIST
Definition
sslconsts.hpp:61
openvpn::SSLConst::NO_VERIFY_HOSTNAME
@ NO_VERIFY_HOSTNAME
Definition
sslconsts.hpp:44
openvpn::SSLConst::LOG_VERIFY_STATUS
@ LOG_VERIFY_STATUS
Definition
sslconsts.hpp:33
openvpn::SSLConst::ENABLE_CLIENT_SNI
@ ENABLE_CLIENT_SNI
Definition
sslconsts.hpp:40
openvpn::SSLConst::LAST
@ LAST
Definition
sslconsts.hpp:67
openvpn::SSLConst::PEER_CERT_OPTIONAL
@ PEER_CERT_OPTIONAL
Definition
sslconsts.hpp:58
openvpn::SSLConst::DEFERRED_CERT_VERIFY
@ DEFERRED_CERT_VERIFY
Definition
sslconsts.hpp:50
flags
reroute_gw flags
Definition
test_capture.cpp:266
openvpn
ssl
sslconsts.hpp
Generated by
1.9.8