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
16
17// Special return values from SSL read/write methods
18enum
19{
20 // Indicates that no cleartext data is available now (until
21 // more ciphertext is pushed into the SSL engine).
23
24 // Return value from read_cleartext indicating that peer
25 // has sent a Close Notify message.
27};
28
29// SSL config flags
30enum
31{
32 // Show SSL status and cert chain in verify method
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
41
42 // [client only] Don't require that the hostname matches
43 // the common name in the certificate.
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.
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
59
60 // [server only] Send a list of client CAs to the client
62
63 // Verify peer by fingerprint, makes CA optional
65
66 // last flag marker
67 LAST = (1 << 9)
68};
69
70// filter all but SSL flags
71inline unsigned int ssl_flags(const unsigned int flags)
72{
73 return flags & (LAST - 1);
74}
75} // namespace openvpn::SSLConst
76
77#endif
unsigned int ssl_flags(const unsigned int flags)
Definition sslconsts.hpp:71
reroute_gw flags