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

#include <x509cert.hpp>

Inheritance diagram for openvpn::MbedTLSPKI::X509Cert:
[legend]
Collaboration diagram for openvpn::MbedTLSPKI::X509Cert:
[legend]

Public Types

typedef RCPtr< X509CertPtr
 
- Public Types inherited from openvpn::RC< thread_unsafe_refcount >
typedef RCPtr< RCPtr
 

Public Member Functions

 X509Cert ()
 
 X509Cert (const std::string &cert_txt, const std::string &title, const bool strict)
 
void parse (const std::string &cert_txt, const std::string &title, const bool strict)
 
std::string extract () const
 
std::vector< std::string > extract_extra_certs () const
 
mbedtls_x509_crt * get () const
 
virtual ~X509Cert ()
 
- 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.
 

Static Public Member Functions

static std::string der_to_pem (const unsigned char *der, size_t der_size)
 
- 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.
 

Protected Member Functions

void alloc ()
 

Protected Attributes

mbedtls_x509_crt * chain
 

Private Member Functions

void dealloc ()
 

Static Private Attributes

static constexpr const char * begin_cert = "-----BEGIN CERTIFICATE-----\n"
 
static constexpr const char * end_cert = "-----END CERTIFICATE-----\n"
 

Detailed Description

Definition at line 34 of file x509cert.hpp.

Member Typedef Documentation

◆ Ptr

Definition at line 37 of file x509cert.hpp.

Constructor & Destructor Documentation

◆ X509Cert() [1/2]

openvpn::MbedTLSPKI::X509Cert::X509Cert ( )
inline

Definition at line 39 of file x509cert.hpp.

◆ X509Cert() [2/2]

openvpn::MbedTLSPKI::X509Cert::X509Cert ( const std::string &  cert_txt,
const std::string &  title,
const bool  strict 
)
inline

Definition at line 44 of file x509cert.hpp.

◆ ~X509Cert()

virtual openvpn::MbedTLSPKI::X509Cert::~X509Cert ( )
inlinevirtual

Definition at line 137 of file x509cert.hpp.

Member Function Documentation

◆ alloc()

void openvpn::MbedTLSPKI::X509Cert::alloc ( )
inlineprotected

Definition at line 143 of file x509cert.hpp.

Here is the caller graph for this function:

◆ dealloc()

void openvpn::MbedTLSPKI::X509Cert::dealloc ( )
inlineprivate

Definition at line 155 of file x509cert.hpp.

Here is the caller graph for this function:

◆ der_to_pem()

static std::string openvpn::MbedTLSPKI::X509Cert::der_to_pem ( const unsigned char *  der,
size_t  der_size 
)
inlinestatic

Definition at line 85 of file x509cert.hpp.

Here is the caller graph for this function:

◆ extract()

std::string openvpn::MbedTLSPKI::X509Cert::extract ( ) const
inline

Definition at line 115 of file x509cert.hpp.

◆ extract_extra_certs()

std::vector< std::string > openvpn::MbedTLSPKI::X509Cert::extract_extra_certs ( ) const
inline

Definition at line 120 of file x509cert.hpp.

◆ get()

mbedtls_x509_crt * openvpn::MbedTLSPKI::X509Cert::get ( ) const
inline

Definition at line 132 of file x509cert.hpp.

Here is the caller graph for this function:

◆ parse()

void openvpn::MbedTLSPKI::X509Cert::parse ( const std::string &  cert_txt,
const std::string &  title,
const bool  strict 
)
inline

Definition at line 58 of file x509cert.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ begin_cert

constexpr const char* openvpn::MbedTLSPKI::X509Cert::begin_cert = "-----BEGIN CERTIFICATE-----\n"
staticconstexprprivate

Definition at line 165 of file x509cert.hpp.

◆ chain

mbedtls_x509_crt* openvpn::MbedTLSPKI::X509Cert::chain
protected

Definition at line 152 of file x509cert.hpp.

◆ end_cert

constexpr const char* openvpn::MbedTLSPKI::X509Cert::end_cert = "-----END CERTIFICATE-----\n"
staticconstexprprivate

Definition at line 166 of file x509cert.hpp.


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