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

#include <sslctx.hpp>

Inheritance diagram for openvpn::MbedTLSContext::Config:
[legend]
Collaboration diagram for openvpn::MbedTLSContext::Config:
[legend]

Public Types

typedef RCPtr< ConfigPtr
 
- Public Types inherited from openvpn::SSLConfigAPI
enum  LoadFlags { LF_PARSE_MODE = (1 << 0) , LF_ALLOW_CLIENT_CERT_NOT_REQUIRED = (1 << 1) , LF_RELAY_MODE = (1 << 2) }
 
typedef RCPtr< SSLConfigAPIPtr
 
- Public Types inherited from openvpn::RC< thread_unsafe_refcount >
typedef RCPtr< RCPtr
 

Public Member Functions

 Config ()
 
SSLFactoryAPI::Ptr new_factory () override
 
void set_mode (const Mode &mode_arg) override
 
const Modeget_mode () const override
 
void set_external_pki_callback (ExternalPKIBase *external_pki_arg, const std::string &alias) override
 
void set_session_ticket_handler (TLSSessionTicketBase *session_ticket_handler_arg) override
 
void set_client_session_tickets (const bool v) override
 
void enable_legacy_algorithms (const bool v) override
 
void set_sni_handler (SNI::HandlerBase *sni_handler) override
 
void set_sni_name (const std::string &sni_name_arg) override
 
void set_cn_reject_handler (CommonNameReject *cn_reject_handler_arg) override
 
void set_private_key_password (const std::string &pwd) override
 
void load_ca (const std::string &ca_txt, bool strict) override
 
void load_crl (const std::string &crl_txt) override
 
void load_cert (const std::string &cert_txt) override
 
void load_cert (const std::string &cert_txt, const std::string &extra_certs_txt) override
 
void load_private_key (const std::string &key_txt) override
 
void load_dh (const std::string &dh_txt) override
 
std::string extract_ca () const override
 
std::string extract_crl () const override
 
std::string extract_cert () const override
 
std::vector< std::string > extract_extra_certs () const override
 
std::string extract_private_key () const override
 
std::string extract_dh () const override
 
PKType::Type private_key_type () const override
 
size_t private_key_length () const override
 
void set_frame (const Frame::Ptr &frame_arg) override
 
void set_debug_level (const int debug_level) override
 
void set_flags (const unsigned int flags_arg) override
 
void set_ns_cert_type (const NSCert::Type ns_cert_type_arg) override
 
void set_remote_cert_tls (const KUParse::TLSWebType wt) override
 
void set_tls_remote (const std::string &tls_remote_arg) override
 
void set_tls_version_min (const TLSVersion::Type tvm) override
 
void set_tls_version_max (const TLSVersion::Type tvm) override
 
void set_tls_version_min_override (const std::string &override) override
 
void set_tls_cert_profile (const TLSCertProfile::Type type) override
 
virtual void set_tls_cipher_list (const std::string &override)
 
virtual void set_tls_ciphersuite_list (const std::string &override)
 
virtual void set_tls_groups (const std::string &groups)
 
void set_tls_cert_profile_override (const std::string &override) override
 
void set_local_cert_enabled (const bool v) override
 
void set_x509_track (X509Track::ConfigSet x509_track_config_arg) override
 
void set_rng (const StrongRandomAPI::Ptr &rng_arg) override
 
std::string validate_cert (const std::string &cert_txt) const override
 
std::string validate_cert_list (const std::string &certs_txt) const override
 
std::string validate_private_key (const std::string &key_txt) const override
 
std::string validate_dh (const std::string &dh_txt) const override
 
std::string validate_crl (const std::string &crl_txt) const override
 
void load (const OptionList &opt, const unsigned int lflags) override
 
bool is_server () const
 
- Public Member Functions inherited from openvpn::SSLConfigAPI
std::string private_key_type_string () const
 
- Public Member Functions inherited from openvpn::RC< thread_unsafe_refcount >
 RC () noexcept=default
 
 RC (const RC &)=delete
 
virtual ~RC ()=default
 
RCoperator= (const RC &)=delete
 
olong use_count () const noexcept
 Delegates call to RCImpl and returns the result.
 

Protected Attributes

MbedTLSPKI::X509Cert::Ptr crt_chain
 
MbedTLSPKI::X509Cert::Ptr ca_chain
 

Private Member Functions

MbedTLSRandomget_mbed_random_class () const
 
const mbedtls_x509_crt_profile * select_crt_profile () const
 

Private Attributes

Mode mode
 
MbedTLSPKI::X509CRL::Ptr crl_chain
 
MbedTLSPKI::PKContext::Ptr priv_key
 
std::string priv_key_pwd
 
MbedTLSPKI::DH::Ptr dh
 
ExternalPKIBaseexternal_pki
 
std::string external_pki_alias
 
Frame::Ptr frame
 
int ssl_debug_level
 
unsigned int flags
 
NSCert::Type ns_cert_type
 
std::vector< unsigned int > ku
 
std::string eku
 
std::string tls_remote
 
VerifyX509Name verify_x509_name
 
TLSVersion::Type tls_version_min
 
TLSCertProfile::Type tls_cert_profile
 
std::string tls_cipher_list
 
std::string tls_groups
 
X509Track::ConfigSet x509_track_config
 
bool local_cert_enabled
 
StrongRandomAPI::Ptr rng
 

Friends

class MbedTLSContext
 

Additional Inherited Members

- Static Public Member Functions inherited from openvpn::RC< thread_unsafe_refcount >
static constexpr bool is_thread_safe ()
 Delegates call to RCImpl and returns the result.
 

Detailed Description

Definition at line 194 of file sslctx.hpp.

Member Typedef Documentation

◆ Ptr

Definition at line 199 of file sslctx.hpp.

Constructor & Destructor Documentation

◆ Config()

openvpn::MbedTLSContext::Config::Config ( )
inline

Definition at line 201 of file sslctx.hpp.

Member Function Documentation

◆ enable_legacy_algorithms()

void openvpn::MbedTLSContext::Config::enable_legacy_algorithms ( const bool  v)
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 246 of file sslctx.hpp.

◆ extract_ca()

std::string openvpn::MbedTLSContext::Config::extract_ca ( ) const
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 319 of file sslctx.hpp.

◆ extract_cert()

std::string openvpn::MbedTLSContext::Config::extract_cert ( ) const
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 333 of file sslctx.hpp.

◆ extract_crl()

std::string openvpn::MbedTLSContext::Config::extract_crl ( ) const
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 326 of file sslctx.hpp.

◆ extract_dh()

std::string openvpn::MbedTLSContext::Config::extract_dh ( ) const
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 354 of file sslctx.hpp.

◆ extract_extra_certs()

std::vector< std::string > openvpn::MbedTLSContext::Config::extract_extra_certs ( ) const
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 340 of file sslctx.hpp.

◆ extract_private_key()

std::string openvpn::MbedTLSContext::Config::extract_private_key ( ) const
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 347 of file sslctx.hpp.

◆ get_mbed_random_class()

MbedTLSRandom * openvpn::MbedTLSContext::Config::get_mbed_random_class ( ) const
inlineprivate

Definition at line 609 of file sslctx.hpp.

Here is the caller graph for this function:

◆ get_mode()

const Mode & openvpn::MbedTLSContext::Config::get_mode ( ) const
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 222 of file sslctx.hpp.

◆ is_server()

bool openvpn::MbedTLSContext::Config::is_server ( ) const
inline

Definition at line 603 of file sslctx.hpp.

◆ load()

void openvpn::MbedTLSContext::Config::load ( const OptionList opt,
const unsigned int  lflags 
)
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 492 of file sslctx.hpp.

◆ load_ca()

void openvpn::MbedTLSContext::Config::load_ca ( const std::string &  ca_txt,
bool  strict 
)
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 274 of file sslctx.hpp.

Here is the caller graph for this function:

◆ load_cert() [1/2]

void openvpn::MbedTLSContext::Config::load_cert ( const std::string &  cert_txt)
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 288 of file sslctx.hpp.

Here is the caller graph for this function:

◆ load_cert() [2/2]

void openvpn::MbedTLSContext::Config::load_cert ( const std::string &  cert_txt,
const std::string &  extra_certs_txt 
)
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 295 of file sslctx.hpp.

◆ load_crl()

void openvpn::MbedTLSContext::Config::load_crl ( const std::string &  crl_txt)
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 281 of file sslctx.hpp.

Here is the caller graph for this function:

◆ load_dh()

void openvpn::MbedTLSContext::Config::load_dh ( const std::string &  dh_txt)
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 312 of file sslctx.hpp.

Here is the caller graph for this function:

◆ load_private_key()

void openvpn::MbedTLSContext::Config::load_private_key ( const std::string &  key_txt)
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 304 of file sslctx.hpp.

Here is the caller graph for this function:

◆ new_factory()

SSLFactoryAPI::Ptr openvpn::MbedTLSContext::Config::new_factory ( )
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 212 of file sslctx.hpp.

◆ private_key_length()

size_t openvpn::MbedTLSContext::Config::private_key_length ( ) const
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 368 of file sslctx.hpp.

◆ private_key_type()

PKType::Type openvpn::MbedTLSContext::Config::private_key_type ( ) const
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 361 of file sslctx.hpp.

◆ select_crt_profile()

const mbedtls_x509_crt_profile * openvpn::MbedTLSContext::Config::select_crt_profile ( ) const
inlineprivate

Definition at line 624 of file sslctx.hpp.

Here is the caller graph for this function:

◆ set_client_session_tickets()

void openvpn::MbedTLSContext::Config::set_client_session_tickets ( const bool  v)
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 240 of file sslctx.hpp.

◆ set_cn_reject_handler()

void openvpn::MbedTLSContext::Config::set_cn_reject_handler ( CommonNameReject cn_reject_handler_arg)
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 264 of file sslctx.hpp.

◆ set_debug_level()

void openvpn::MbedTLSContext::Config::set_debug_level ( const int  debug_level)
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 380 of file sslctx.hpp.

◆ set_external_pki_callback()

void openvpn::MbedTLSContext::Config::set_external_pki_callback ( ExternalPKIBase external_pki_arg,
const std::string &  alias 
)
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 228 of file sslctx.hpp.

◆ set_flags()

void openvpn::MbedTLSContext::Config::set_flags ( const unsigned int  flags_arg)
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 385 of file sslctx.hpp.

◆ set_frame()

void openvpn::MbedTLSContext::Config::set_frame ( const Frame::Ptr frame_arg)
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 375 of file sslctx.hpp.

◆ set_local_cert_enabled()

void openvpn::MbedTLSContext::Config::set_local_cert_enabled ( const bool  v)
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 446 of file sslctx.hpp.

◆ set_mode()

void openvpn::MbedTLSContext::Config::set_mode ( const Mode mode_arg)
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 217 of file sslctx.hpp.

◆ set_ns_cert_type()

void openvpn::MbedTLSContext::Config::set_ns_cert_type ( const NSCert::Type  ns_cert_type_arg)
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 390 of file sslctx.hpp.

◆ set_private_key_password()

void openvpn::MbedTLSContext::Config::set_private_key_password ( const std::string &  pwd)
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 269 of file sslctx.hpp.

◆ set_remote_cert_tls()

void openvpn::MbedTLSContext::Config::set_remote_cert_tls ( const KUParse::TLSWebType  wt)
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 395 of file sslctx.hpp.

◆ set_rng()

void openvpn::MbedTLSContext::Config::set_rng ( const StrongRandomAPI::Ptr rng_arg)
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 456 of file sslctx.hpp.

◆ set_session_ticket_handler()

void openvpn::MbedTLSContext::Config::set_session_ticket_handler ( TLSSessionTicketBase session_ticket_handler_arg)
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 234 of file sslctx.hpp.

◆ set_sni_handler()

void openvpn::MbedTLSContext::Config::set_sni_handler ( SNI::HandlerBase sni_handler)
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 252 of file sslctx.hpp.

◆ set_sni_name()

void openvpn::MbedTLSContext::Config::set_sni_name ( const std::string &  sni_name_arg)
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 258 of file sslctx.hpp.

Here is the caller graph for this function:

◆ set_tls_cert_profile()

void openvpn::MbedTLSContext::Config::set_tls_cert_profile ( const TLSCertProfile::Type  type)
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 419 of file sslctx.hpp.

◆ set_tls_cert_profile_override()

void openvpn::MbedTLSContext::Config::set_tls_cert_profile_override ( const std::string &  override)
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 441 of file sslctx.hpp.

◆ set_tls_cipher_list()

virtual void openvpn::MbedTLSContext::Config::set_tls_cipher_list ( const std::string &  override)
inlinevirtual

Definition at line 424 of file sslctx.hpp.

◆ set_tls_ciphersuite_list()

virtual void openvpn::MbedTLSContext::Config::set_tls_ciphersuite_list ( const std::string &  override)
inlinevirtual

Definition at line 430 of file sslctx.hpp.

◆ set_tls_groups()

virtual void openvpn::MbedTLSContext::Config::set_tls_groups ( const std::string &  groups)
inlinevirtual

Definition at line 435 of file sslctx.hpp.

◆ set_tls_remote()

void openvpn::MbedTLSContext::Config::set_tls_remote ( const std::string &  tls_remote_arg)
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 400 of file sslctx.hpp.

◆ set_tls_version_max()

void openvpn::MbedTLSContext::Config::set_tls_version_max ( const TLSVersion::Type  tvm)
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 410 of file sslctx.hpp.

◆ set_tls_version_min()

void openvpn::MbedTLSContext::Config::set_tls_version_min ( const TLSVersion::Type  tvm)
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 405 of file sslctx.hpp.

◆ set_tls_version_min_override()

void openvpn::MbedTLSContext::Config::set_tls_version_min_override ( const std::string &  override)
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 414 of file sslctx.hpp.

◆ set_x509_track()

void openvpn::MbedTLSContext::Config::set_x509_track ( X509Track::ConfigSet  x509_track_config_arg)
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 451 of file sslctx.hpp.

◆ validate_cert()

std::string openvpn::MbedTLSContext::Config::validate_cert ( const std::string &  cert_txt) const
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 461 of file sslctx.hpp.

◆ validate_cert_list()

std::string openvpn::MbedTLSContext::Config::validate_cert_list ( const std::string &  certs_txt) const
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 467 of file sslctx.hpp.

◆ validate_crl()

std::string openvpn::MbedTLSContext::Config::validate_crl ( const std::string &  crl_txt) const
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 486 of file sslctx.hpp.

◆ validate_dh()

std::string openvpn::MbedTLSContext::Config::validate_dh ( const std::string &  dh_txt) const
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 480 of file sslctx.hpp.

◆ validate_private_key()

std::string openvpn::MbedTLSContext::Config::validate_private_key ( const std::string &  key_txt) const
inlineoverridevirtual

Implements openvpn::SSLConfigAPI.

Definition at line 473 of file sslctx.hpp.

Friends And Related Symbol Documentation

◆ MbedTLSContext

friend class MbedTLSContext
friend

Definition at line 196 of file sslctx.hpp.

Member Data Documentation

◆ ca_chain

MbedTLSPKI::X509Cert::Ptr openvpn::MbedTLSContext::Config::ca_chain
protected

Definition at line 647 of file sslctx.hpp.

◆ crl_chain

MbedTLSPKI::X509CRL::Ptr openvpn::MbedTLSContext::Config::crl_chain
private

Definition at line 650 of file sslctx.hpp.

◆ crt_chain

MbedTLSPKI::X509Cert::Ptr openvpn::MbedTLSContext::Config::crt_chain
protected

Definition at line 646 of file sslctx.hpp.

◆ dh

MbedTLSPKI::DH::Ptr openvpn::MbedTLSContext::Config::dh
private

Definition at line 653 of file sslctx.hpp.

◆ eku

std::string openvpn::MbedTLSContext::Config::eku
private

Definition at line 661 of file sslctx.hpp.

◆ external_pki

ExternalPKIBase* openvpn::MbedTLSContext::Config::external_pki
private

Definition at line 654 of file sslctx.hpp.

◆ external_pki_alias

std::string openvpn::MbedTLSContext::Config::external_pki_alias
private

Definition at line 655 of file sslctx.hpp.

◆ flags

unsigned int openvpn::MbedTLSContext::Config::flags
private

Definition at line 658 of file sslctx.hpp.

◆ frame

Frame::Ptr openvpn::MbedTLSContext::Config::frame
private

Definition at line 656 of file sslctx.hpp.

◆ ku

std::vector<unsigned int> openvpn::MbedTLSContext::Config::ku
private

Definition at line 660 of file sslctx.hpp.

◆ local_cert_enabled

bool openvpn::MbedTLSContext::Config::local_cert_enabled
private

Definition at line 669 of file sslctx.hpp.

◆ mode

Mode openvpn::MbedTLSContext::Config::mode
private

Definition at line 643 of file sslctx.hpp.

◆ ns_cert_type

NSCert::Type openvpn::MbedTLSContext::Config::ns_cert_type
private

Definition at line 659 of file sslctx.hpp.

◆ priv_key

MbedTLSPKI::PKContext::Ptr openvpn::MbedTLSContext::Config::priv_key
private

Definition at line 651 of file sslctx.hpp.

◆ priv_key_pwd

std::string openvpn::MbedTLSContext::Config::priv_key_pwd
private

Definition at line 652 of file sslctx.hpp.

◆ rng

StrongRandomAPI::Ptr openvpn::MbedTLSContext::Config::rng
private

Definition at line 670 of file sslctx.hpp.

◆ ssl_debug_level

int openvpn::MbedTLSContext::Config::ssl_debug_level
private

Definition at line 657 of file sslctx.hpp.

◆ tls_cert_profile

TLSCertProfile::Type openvpn::MbedTLSContext::Config::tls_cert_profile
private

Definition at line 665 of file sslctx.hpp.

◆ tls_cipher_list

std::string openvpn::MbedTLSContext::Config::tls_cipher_list
private

Definition at line 666 of file sslctx.hpp.

◆ tls_groups

std::string openvpn::MbedTLSContext::Config::tls_groups
private

Definition at line 667 of file sslctx.hpp.

◆ tls_remote

std::string openvpn::MbedTLSContext::Config::tls_remote
private

Definition at line 662 of file sslctx.hpp.

◆ tls_version_min

TLSVersion::Type openvpn::MbedTLSContext::Config::tls_version_min
private

Definition at line 664 of file sslctx.hpp.

◆ verify_x509_name

VerifyX509Name openvpn::MbedTLSContext::Config::verify_x509_name
private

Definition at line 663 of file sslctx.hpp.

◆ x509_track_config

X509Track::ConfigSet openvpn::MbedTLSContext::Config::x509_track_config
private

Definition at line 668 of file sslctx.hpp.


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