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

#include <pkey.hpp>

Public Member Functions

 PKey ()
 
 PKey (const std::string &pkey_txt, const std::string &title, SSLLib::Ctx ctx)
 
 PKey (const PKey &other)
 
 PKey (PKey &&other) noexcept
 
PKeyoperator= (const PKey &other)
 
PKeyoperator= (PKey &&other) noexcept
 
bool defined () const
 
::EVP_PKEY * obj () const
 
PKType::Type key_type () const
 
size_t key_length () const
 
void set_private_key_password (const std::string &pwd)
 
void parse_pem (const std::string &pkey_txt, const std::string &title, SSLLib::Ctx libctx)
 
std::string render_pem () const
 
 ~PKey ()
 

Private Member Functions

void erase ()
 

Static Private Member Functions

static int pem_password_callback (char *buf, int size, int rwflag, void *userdata)
 
::EVP_PKEY * dup (const ::EVP_PKEY *pkey)
 

Private Attributes

::EVP_PKEY * pkey_
 
std::string priv_key_pwd
 

Detailed Description

Definition at line 32 of file pkey.hpp.

Constructor & Destructor Documentation

◆ PKey() [1/4]

openvpn::OpenSSLPKI::PKey::PKey ( )
inline

Definition at line 35 of file pkey.hpp.

◆ PKey() [2/4]

openvpn::OpenSSLPKI::PKey::PKey ( const std::string &  pkey_txt,
const std::string &  title,
SSLLib::Ctx  ctx 
)
inline

Definition at line 40 of file pkey.hpp.

◆ PKey() [3/4]

openvpn::OpenSSLPKI::PKey::PKey ( const PKey other)
inline

Definition at line 46 of file pkey.hpp.

◆ PKey() [4/4]

openvpn::OpenSSLPKI::PKey::PKey ( PKey &&  other)
inlinenoexcept

Definition at line 52 of file pkey.hpp.

◆ ~PKey()

openvpn::OpenSSLPKI::PKey::~PKey ( )
inline

Definition at line 167 of file pkey.hpp.

Member Function Documentation

◆ defined()

bool openvpn::OpenSSLPKI::PKey::defined ( ) const
inline

Definition at line 82 of file pkey.hpp.

Here is the caller graph for this function:

◆ dup()

::EVP_PKEY * openvpn::OpenSSLPKI::PKey::dup ( const ::EVP_PKEY *  pkey)
inlinestaticprivate

Definition at line 194 of file pkey.hpp.

Here is the caller graph for this function:

◆ erase()

void openvpn::OpenSSLPKI::PKey::erase ( )
inlineprivate

Definition at line 187 of file pkey.hpp.

Here is the caller graph for this function:

◆ key_length()

size_t openvpn::OpenSSLPKI::PKey::key_length ( ) const
inline

Definition at line 113 of file pkey.hpp.

Here is the caller graph for this function:

◆ key_type()

PKType::Type openvpn::OpenSSLPKI::PKey::key_type ( ) const
inline

Definition at line 91 of file pkey.hpp.

Here is the caller graph for this function:

◆ obj()

::EVP_PKEY * openvpn::OpenSSLPKI::PKey::obj ( ) const
inline

Definition at line 86 of file pkey.hpp.

Here is the caller graph for this function:

◆ operator=() [1/2]

PKey & openvpn::OpenSSLPKI::PKey::operator= ( const PKey other)
inline

Definition at line 59 of file pkey.hpp.

◆ operator=() [2/2]

PKey & openvpn::OpenSSLPKI::PKey::operator= ( PKey &&  other)
inlinenoexcept

Definition at line 70 of file pkey.hpp.

◆ parse_pem()

void openvpn::OpenSSLPKI::PKey::parse_pem ( const std::string &  pkey_txt,
const std::string &  title,
SSLLib::Ctx  libctx 
)
inline

Definition at line 128 of file pkey.hpp.

Here is the caller graph for this function:

◆ pem_password_callback()

static int openvpn::OpenSSLPKI::PKey::pem_password_callback ( char *  buf,
int  size,
int  rwflag,
void *  userdata 
)
inlinestaticprivate

Definition at line 173 of file pkey.hpp.

Here is the caller graph for this function:

◆ render_pem()

std::string openvpn::OpenSSLPKI::PKey::render_pem ( ) const
inline

Definition at line 143 of file pkey.hpp.

Here is the caller graph for this function:

◆ set_private_key_password()

void openvpn::OpenSSLPKI::PKey::set_private_key_password ( const std::string &  pwd)
inline

Definition at line 123 of file pkey.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ pkey_

::EVP_PKEY* openvpn::OpenSSLPKI::PKey::pkey_
private

Definition at line 220 of file pkey.hpp.

◆ priv_key_pwd

std::string openvpn::OpenSSLPKI::PKey::priv_key_pwd
private

Definition at line 221 of file pkey.hpp.


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