E-MailRelay
Classes | Typedefs | Functions
GSsl::MbedTls Namespace Reference

A namespace for implementing the GSsl interface using the mbedtls library. More...

Classes

class  Certificate
 Holds a mbedtls_x509_crt structure. More...
 
class  Config
 Holds protocol version information, etc. More...
 
class  Context
 Holds a mbedtls_ssl_context structure. More...
 
class  DigesterImp
 An implementation of the GSsl::DigesterImpBase interface for MbedTls.
 
struct  Error
 An exception class for GSsl::MbedTls classes. More...
 
class  Key
 Holds a mbedtls_pk_context structure. More...
 
class  LibraryImp
 An implementation of the GSsl::LibraryImpBase interface for mbedtls.
 
class  ProfileImp
 An implementation of the GSsl::Profile interface for mbedtls.
 
class  ProtocolImp
 An implementation of the GSsl::ProtocolImpBase interface for mbedtls.
 
class  Rng
 Holds a mbedtls_ctr_drbg_context structure. More...
 
class  SecureFile
 An interface for reading a sensitive file and then overwriting its contents in memory. More...
 
struct  X
 Initialises and frees an mbedtls object on construction and destruction. More...
 

Typedefs

using old_fn = int(*)(mbedtls_pk_context *c, const unsigned char *k, std::size_t ks, const unsigned char *p, std::size_t ps)
 
using new_fn = int(*)(mbedtls_pk_context *c, const unsigned char *k, std::size_t ks, const unsigned char *p, std::size_t ps, int(*r)(void *, unsigned char *, std::size_t), void *rp)
 

Functions

std::string generateKey (const std::string &issuer_name)
 
template<typename F , typename... Args>
void call (int ok, const char *fname, F fn, Args &&... args)
 
template<typename F , typename... Args>
void call (std::nullptr_t, const char *, F fn, Args &&... args)
 
int call_fn (old_fn fn, mbedtls_pk_context *c, const unsigned char *k, std::size_t ks, const unsigned char *p, std::size_t ps, int(*)(void *, unsigned char *, std::size_t), void *)
 
int call_fn (new_fn fn, mbedtls_pk_context *c, const unsigned char *k, std::size_t ks, const unsigned char *p, std::size_t ps, int(*r)(void *, unsigned char *, std::size_t), void *rp)
 

Detailed Description

A namespace for implementing the GSsl interface using the mbedtls library.

Typedef Documentation

◆ new_fn

using GSsl::MbedTls::new_fn = typedef int (*)( mbedtls_pk_context* c , const unsigned char* k , std::size_t ks , const unsigned char * p , std::size_t ps , int (*r)(void*,unsigned char*,std::size_t) , void* rp )

Definition at line 74 of file gssl_mbedtls_utils.h.

◆ old_fn

using GSsl::MbedTls::old_fn = typedef int (*)( mbedtls_pk_context * c , const unsigned char * k , std::size_t ks , const unsigned char * p , std::size_t ps )

Definition at line 72 of file gssl_mbedtls_utils.h.

Function Documentation

◆ call() [1/2]

template<typename F , typename... Args>
void GSsl::MbedTls::call ( int  ok,
const char *  fname,
fn,
Args &&...  args 
)

Definition at line 57 of file gssl_mbedtls_utils.h.

◆ call() [2/2]

template<typename F , typename... Args>
void GSsl::MbedTls::call ( std::nullptr_t  ,
const char *  ,
fn,
Args &&...  args 
)

Definition at line 66 of file gssl_mbedtls_utils.h.

◆ call_fn() [1/2]

int GSsl::MbedTls::call_fn ( new_fn  fn,
mbedtls_pk_context *  c,
const unsigned char *  k,
std::size_t  ks,
const unsigned char *  p,
std::size_t  ps,
int(*)(void *, unsigned char *, std::size_t)  r,
void *  rp 
)
inline

Definition at line 84 of file gssl_mbedtls_utils.h.

◆ call_fn() [2/2]

int GSsl::MbedTls::call_fn ( old_fn  fn,
mbedtls_pk_context *  c,
const unsigned char *  k,
std::size_t  ks,
const unsigned char *  p,
std::size_t  ps,
int(*)(void *, unsigned char *, std::size_t)  ,
void *   
)
inline

Definition at line 77 of file gssl_mbedtls_utils.h.

◆ generateKey()

std::string GSsl::MbedTls::generateKey ( const std::string &  issuer_name)

Definition at line 68 of file gssl_mbedtls_keygen.cpp.