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

#include <xkey.hpp>

Inheritance diagram for openvpn::XKeyExternalPKIImpl:
[legend]
Collaboration diagram for openvpn::XKeyExternalPKIImpl:
[legend]

Public Member Functions

 ~XKeyExternalPKIImpl ()
 
 XKeyExternalPKIImpl (ExternalPKIBase *external_pki, std::string alias)
 
void use_external_key (SSL_CTX *ssl_ctx, ::X509 *cert)
 
- Public Member Functions inherited from openvpn::ExternalPKIImpl
virtual ~ExternalPKIImpl ()=default
 

Static Public Member Functions

static std::shared_ptr< XKeyExternalPKIImplcreate (SSL_CTX *ssl_ctx, ::X509 *cert, ExternalPKIBase *external_pki, std::string alias)
 

Private Types

using OSSL_LIB_CTX_unique_ptr = std::unique_ptr<::OSSL_LIB_CTX, decltype(&::OSSL_LIB_CTX_free)>
 

Private Member Functions

void load_xkey_provider ()
 
EVP_PKEY * tls_ctx_use_external_key (::SSL_CTX *ctx, ::X509 *cert)
 
int xkey_sign (unsigned char *sig, size_t *siglen, const unsigned char *tbs, size_t tbslen, XKEY_SIGALG alg)
 

Static Private Member Functions

static void xkey_logging_callback (const char *message, bool debug)
 
static int provider_load (OSSL_PROVIDER *prov, void *dest_libctx)
 
static int provider_unload (OSSL_PROVIDER *prov, void *unused)
 
static int xkey_sign_cb (void *this_ptr, unsigned char *sig, size_t *siglen, const unsigned char *tbs, size_t tbslen, XKEY_SIGALG alg)
 
static void xkey_free_cb (void *this_ptr)
 

Private Attributes

OSSL_LIB_CTX_unique_ptr tls_libctx {nullptr, ::OSSL_LIB_CTX_free}
 
ExternalPKIBaseexternal_pki
 
std::string alias
 

Detailed Description

Definition at line 28 of file xkey.hpp.

Member Typedef Documentation

◆ OSSL_LIB_CTX_unique_ptr

using openvpn::XKeyExternalPKIImpl::OSSL_LIB_CTX_unique_ptr = std::unique_ptr<::OSSL_LIB_CTX, decltype(&::OSSL_LIB_CTX_free)>
private

Definition at line 31 of file xkey.hpp.

Constructor & Destructor Documentation

◆ ~XKeyExternalPKIImpl()

openvpn::XKeyExternalPKIImpl::~XKeyExternalPKIImpl ( )
inline

Definition at line 131 of file xkey.hpp.

◆ XKeyExternalPKIImpl()

openvpn::XKeyExternalPKIImpl::XKeyExternalPKIImpl ( ExternalPKIBase external_pki,
std::string  alias 
)
inline

Definition at line 139 of file xkey.hpp.

Member Function Documentation

◆ create()

static std::shared_ptr< XKeyExternalPKIImpl > openvpn::XKeyExternalPKIImpl::create ( SSL_CTX *  ssl_ctx,
::X509 *  cert,
ExternalPKIBase external_pki,
std::string  alias 
)
inlinestatic

Definition at line 124 of file xkey.hpp.

Here is the caller graph for this function:

◆ load_xkey_provider()

void openvpn::XKeyExternalPKIImpl::load_xkey_provider ( )
inlineprivate

Definition at line 59 of file xkey.hpp.

Here is the caller graph for this function:

◆ provider_load()

static int openvpn::XKeyExternalPKIImpl::provider_load ( OSSL_PROVIDER *  prov,
void *  dest_libctx 
)
inlinestaticprivate

Definition at line 45 of file xkey.hpp.

Here is the caller graph for this function:

◆ provider_unload()

static int openvpn::XKeyExternalPKIImpl::provider_unload ( OSSL_PROVIDER *  prov,
void *  unused 
)
inlinestaticprivate

Definition at line 53 of file xkey.hpp.

Here is the caller graph for this function:

◆ tls_ctx_use_external_key()

EVP_PKEY * openvpn::XKeyExternalPKIImpl::tls_ctx_use_external_key ( ::SSL_CTX *  ctx,
::X509 *  cert 
)
inlineprivate

Definition at line 99 of file xkey.hpp.

Here is the caller graph for this function:

◆ use_external_key()

void openvpn::XKeyExternalPKIImpl::use_external_key ( SSL_CTX *  ssl_ctx,
::X509 *  cert 
)
inline

Definition at line 144 of file xkey.hpp.

◆ xkey_free_cb()

static void openvpn::XKeyExternalPKIImpl::xkey_free_cb ( void *  this_ptr)
inlinestaticprivate

Definition at line 172 of file xkey.hpp.

Here is the caller graph for this function:

◆ xkey_logging_callback()

static void openvpn::XKeyExternalPKIImpl::xkey_logging_callback ( const char *  message,
bool  debug 
)
inlinestaticprivate

Definition at line 38 of file xkey.hpp.

Here is the caller graph for this function:

◆ xkey_sign()

int openvpn::XKeyExternalPKIImpl::xkey_sign ( unsigned char *  sig,
size_t *  siglen,
const unsigned char *  tbs,
size_t  tbslen,
XKEY_SIGALG  alg 
)
inlineprivate

Signature callback for xkey_provider

Parameters
sigOn successful return signature is in sig.
siglenOn entry *siglen has length of buffer sig, on successful return size of signature
tbshash or message to be signed
tbslenlen of data in dgst
algextra signature parameters
Returns
signature length or -1 on error.

Definition at line 198 of file xkey.hpp.

◆ xkey_sign_cb()

static int openvpn::XKeyExternalPKIImpl::xkey_sign_cb ( void *  this_ptr,
unsigned char *  sig,
size_t *  siglen,
const unsigned char *  tbs,
size_t  tbslen,
XKEY_SIGALG  alg 
)
inlinestaticprivate

Definition at line 162 of file xkey.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ alias

std::string openvpn::XKeyExternalPKIImpl::alias
private

Definition at line 35 of file xkey.hpp.

◆ external_pki

ExternalPKIBase* openvpn::XKeyExternalPKIImpl::external_pki
private

Definition at line 34 of file xkey.hpp.

◆ tls_libctx

OSSL_LIB_CTX_unique_ptr openvpn::XKeyExternalPKIImpl::tls_libctx {nullptr, ::OSSL_LIB_CTX_free}
private

Definition at line 33 of file xkey.hpp.


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