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

#include <pkctx.hpp>

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

Public Types

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

Public Member Functions

 PKContext ()
 
 PKContext (const std::string &key_txt, const std::string &title, const std::string &priv_key_pwd, MbedTLSRandom &rand)
 
bool defined () const
 
PKType::Type key_type () const
 
size_t key_length () const
 
void parse (const std::string &key_txt, const std::string &title, const std::string &priv_key_pwd, MbedTLSRandom &rand)
 
std::string extract () const
 
std::string render_pem () const
 
void epki_enable (void *arg, mbedtls_pk_rsa_alt_decrypt_func epki_decrypt, mbedtls_pk_rsa_alt_sign_func epki_sign, mbedtls_pk_rsa_alt_key_len_func epki_key_len)
 
mbedtls_pk_context * get () const
 
 ~PKContext ()
 
- 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.
 

Private Member Functions

void alloc ()
 
void dealloc ()
 

Private Attributes

mbedtls_pk_context * ctx
 

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 31 of file pkctx.hpp.

Member Typedef Documentation

◆ Ptr

Definition at line 34 of file pkctx.hpp.

Constructor & Destructor Documentation

◆ PKContext() [1/2]

openvpn::MbedTLSPKI::PKContext::PKContext ( )
inline

Definition at line 36 of file pkctx.hpp.

◆ PKContext() [2/2]

openvpn::MbedTLSPKI::PKContext::PKContext ( const std::string &  key_txt,
const std::string &  title,
const std::string &  priv_key_pwd,
MbedTLSRandom rand 
)
inline

Definition at line 41 of file pkctx.hpp.

◆ ~PKContext()

openvpn::MbedTLSPKI::PKContext::~PKContext ( )
inline

Definition at line 138 of file pkctx.hpp.

Member Function Documentation

◆ alloc()

void openvpn::MbedTLSPKI::PKContext::alloc ( )
inlineprivate

Definition at line 144 of file pkctx.hpp.

Here is the caller graph for this function:

◆ dealloc()

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

Definition at line 153 of file pkctx.hpp.

Here is the caller graph for this function:

◆ defined()

bool openvpn::MbedTLSPKI::PKContext::defined ( ) const
inline

Definition at line 55 of file pkctx.hpp.

Here is the caller graph for this function:

◆ epki_enable()

void openvpn::MbedTLSPKI::PKContext::epki_enable ( void *  arg,
mbedtls_pk_rsa_alt_decrypt_func  epki_decrypt,
mbedtls_pk_rsa_alt_sign_func  epki_sign,
mbedtls_pk_rsa_alt_key_len_func  epki_key_len 
)
inline

Definition at line 122 of file pkctx.hpp.

Here is the caller graph for this function:

◆ extract()

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

Definition at line 105 of file pkctx.hpp.

Here is the caller graph for this function:

◆ get()

mbedtls_pk_context * openvpn::MbedTLSPKI::PKContext::get ( ) const
inline

Definition at line 133 of file pkctx.hpp.

Here is the caller graph for this function:

◆ key_length()

size_t openvpn::MbedTLSPKI::PKContext::key_length ( ) const
inline

Definition at line 80 of file pkctx.hpp.

◆ key_type()

PKType::Type openvpn::MbedTLSPKI::PKContext::key_type ( ) const
inline

Definition at line 60 of file pkctx.hpp.

◆ parse()

void openvpn::MbedTLSPKI::PKContext::parse ( const std::string &  key_txt,
const std::string &  title,
const std::string &  priv_key_pwd,
MbedTLSRandom rand 
)
inline

Definition at line 85 of file pkctx.hpp.

Here is the caller graph for this function:

◆ render_pem()

std::string openvpn::MbedTLSPKI::PKContext::render_pem ( ) const
inline

Definition at line 117 of file pkctx.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ ctx

mbedtls_pk_context* openvpn::MbedTLSPKI::PKContext::ctx
private

Definition at line 163 of file pkctx.hpp.


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