OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::VerifyX509Name Class Reference

#include <verify_x509_name.hpp>

Public Types

enum  Mode { VERIFY_X509_NONE = 0 , VERIFY_X509_SUBJECT_DN = 1 , VERIFY_X509_SUBJECT_RDN = 2 , VERIFY_X509_SUBJECT_RDN_PREFIX = 3 }
 

Public Member Functions

 VerifyX509Name ()=default
 
 VerifyX509Name (const OptionList &opt, const std::string &relay_prefix="")
 
 ~VerifyX509Name ()=default
 
void init (const OptionList &opt, const std::string &relay_prefix)
 
std::string get_mode_str () const
 
Mode get_mode () const
 
bool verify (const std::string &value) const
 

Static Private Member Functions

static Mode parse_x509_verify_mode (const std::string &type)
 

Private Attributes

Mode mode = VERIFY_X509_NONE
 
std::string verify_value
 

Detailed Description

Parses the –verify-x509-name configuration option and provides the logic to validate an X.509 certificate subject against such an option.

Definition at line 24 of file verify_x509_name.hpp.

Member Enumeration Documentation

◆ Mode

Enumerator
VERIFY_X509_NONE 
VERIFY_X509_SUBJECT_DN 
VERIFY_X509_SUBJECT_RDN 
VERIFY_X509_SUBJECT_RDN_PREFIX 

Definition at line 27 of file verify_x509_name.hpp.

Constructor & Destructor Documentation

◆ VerifyX509Name() [1/2]

openvpn::VerifyX509Name::VerifyX509Name ( )
default

◆ VerifyX509Name() [2/2]

openvpn::VerifyX509Name::VerifyX509Name ( const OptionList opt,
const std::string &  relay_prefix = "" 
)
inline

Definition at line 37 of file verify_x509_name.hpp.

◆ ~VerifyX509Name()

openvpn::VerifyX509Name::~VerifyX509Name ( )
default

Member Function Documentation

◆ get_mode()

Mode openvpn::VerifyX509Name::get_mode ( ) const
inline

Definition at line 74 of file verify_x509_name.hpp.

Here is the caller graph for this function:

◆ get_mode_str()

std::string openvpn::VerifyX509Name::get_mode_str ( ) const
inline

Definition at line 57 of file verify_x509_name.hpp.

◆ init()

void openvpn::VerifyX509Name::init ( const OptionList opt,
const std::string &  relay_prefix 
)
inline

Definition at line 44 of file verify_x509_name.hpp.

Here is the caller graph for this function:

◆ parse_x509_verify_mode()

static Mode openvpn::VerifyX509Name::parse_x509_verify_mode ( const std::string &  type)
inlinestaticprivate

Definition at line 110 of file verify_x509_name.hpp.

Here is the caller graph for this function:

◆ verify()

bool openvpn::VerifyX509Name::verify ( const std::string &  value) const
inline

Definition at line 79 of file verify_x509_name.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ mode

Mode openvpn::VerifyX509Name::mode = VERIFY_X509_NONE
private

Definition at line 107 of file verify_x509_name.hpp.

◆ verify_value

std::string openvpn::VerifyX509Name::verify_value
private

Definition at line 108 of file verify_x509_name.hpp.


The documentation for this class was generated from the following file: