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 33 of file pkey.hpp.

Constructor & Destructor Documentation

◆ PKey() [1/4]

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

Definition at line 36 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 41 of file pkey.hpp.

◆ PKey() [3/4]

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

Definition at line 47 of file pkey.hpp.

◆ PKey() [4/4]

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

Definition at line 53 of file pkey.hpp.

◆ ~PKey()

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

Definition at line 168 of file pkey.hpp.

Member Function Documentation

◆ defined()

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

Definition at line 83 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 195 of file pkey.hpp.

Here is the caller graph for this function:

◆ erase()

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

Definition at line 188 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 114 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 92 of file pkey.hpp.

Here is the caller graph for this function:

◆ obj()

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

Definition at line 87 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 60 of file pkey.hpp.

◆ operator=() [2/2]

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

Definition at line 71 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 129 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 174 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 144 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 124 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: