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

#include <sslctx.hpp>

Inheritance diagram for openvpn::MbedTLSContext::SSL:
[legend]
Collaboration diagram for openvpn::MbedTLSContext::SSL:
[legend]

Public Types

typedef RCPtr< SSLPtr
 
- Public Types inherited from openvpn::SSLAPI
enum  TLSWarnings { TLS_WARN_NONE = 0 , TLS_WARN_SIG_MD5 = (1 << 0) , TLS_WARN_SIG_SHA1 = (1 << 1) }
 
typedef RCPtr< SSLAPIPtr
 
- Public Types inherited from openvpn::RC< thread_unsafe_refcount >
typedef RCPtr< RCPtr
 

Public Member Functions

void start_handshake () override
 
ssize_t write_cleartext_unbuffered (const void *data, const size_t size) override
 
ssize_t read_cleartext (void *data, const size_t capacity) override
 
bool read_cleartext_ready () const override
 
void write_ciphertext (const BufferPtr &buf) override
 
void write_ciphertext_unbuffered (const unsigned char *data, const size_t size) override
 
bool read_ciphertext_ready () const override
 
BufferPtr read_ciphertext () override
 
std::string ssl_handshake_details () const override
 
bool export_keying_material (const std::string &label, unsigned char *, size_t size) override
 
bool did_full_handshake () override
 
const AuthCert::Ptrauth_cert () const override
 
void mark_no_cache () override
 
virtual ~SSL ()
 
- Public Member Functions inherited from openvpn::SSLAPI
uint32_t get_tls_warnings () const
 
- 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.
 

Protected Member Functions

 SSL (MbedTLSContext *ctx, const char *hostname)
 

Protected Attributes

mbedtls_ssl_config * sslconf
 
std::unique_ptr< int[]> allowed_ciphers
 
std::unique_ptr< mbedtls_ecp_group_id[]> groups
 Hold the array that is used for setting the allowed ciphers.
 
MbedTLSContextparent
 Hold the array that is used for setting the curves.
 
- Protected Attributes inherited from openvpn::SSLAPI
uint32_t tls_warnings = 0
 

Private Types

enum  { CT_WOULD_BLOCK = -0x8000 , CT_INTERNAL_ERROR = -0x8001 }
 

Private Member Functions

void set_mbedtls_cipherlist (const std::string &cipher_list)
 
void set_mbedtls_groups (const std::string &tls_groups)
 
void clear ()
 
void erase ()
 

Static Private Member Functions

static int ct_read_func (void *arg, unsigned char *data, size_t length)
 
static int ct_write_func (void *arg, const unsigned char *data, size_t length)
 
static int rng_callback (void *arg, unsigned char *data, size_t len)
 
static void dbg_callback (void *arg, int level, const char *filename, int linenum, const char *text)
 

Private Attributes

mbedtls_ssl_context * ssl
 
MbedTLSPKI::PKContext epki_ctx
 
RandomAPI::Ptr rng
 
MemQStream ct_in
 
MemQStream ct_out
 
AuthCert::Ptr authcert
 
bool overflow
 

Friends

class MbedTLSContext
 

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 675 of file sslctx.hpp.

Member Typedef Documentation

◆ Ptr

Definition at line 688 of file sslctx.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
CT_WOULD_BLOCK 
CT_INTERNAL_ERROR 

Definition at line 678 of file sslctx.hpp.

Constructor & Destructor Documentation

◆ ~SSL()

virtual openvpn::MbedTLSContext::SSL::~SSL ( )
inlinevirtual

Definition at line 797 of file sslctx.hpp.

◆ SSL()

openvpn::MbedTLSContext::SSL::SSL ( MbedTLSContext ctx,
const char *  hostname 
)
inlineprotected

Definition at line 803 of file sslctx.hpp.

Member Function Documentation

◆ auth_cert()

const AuthCert::Ptr & openvpn::MbedTLSContext::SSL::auth_cert ( ) const
inlineoverridevirtual

Implements openvpn::SSLAPI.

Definition at line 787 of file sslctx.hpp.

◆ clear()

void openvpn::MbedTLSContext::SSL::clear ( )
inlineprivate

Definition at line 1159 of file sslctx.hpp.

Here is the caller graph for this function:

◆ ct_read_func()

static int openvpn::MbedTLSContext::SSL::ct_read_func ( void *  arg,
unsigned char *  data,
size_t  length 
)
inlinestaticprivate

Definition at line 1113 of file sslctx.hpp.

Here is the caller graph for this function:

◆ ct_write_func()

static int openvpn::MbedTLSContext::SSL::ct_write_func ( void *  arg,
const unsigned char *  data,
size_t  length 
)
inlinestaticprivate

Definition at line 1128 of file sslctx.hpp.

Here is the caller graph for this function:

◆ dbg_callback()

static void openvpn::MbedTLSContext::SSL::dbg_callback ( void *  arg,
int  level,
const char *  filename,
int  linenum,
const char *  text 
)
inlinestaticprivate

Definition at line 1151 of file sslctx.hpp.

Here is the caller graph for this function:

◆ did_full_handshake()

bool openvpn::MbedTLSContext::SSL::did_full_handshake ( )
inlineoverridevirtual

Implements openvpn::SSLAPI.

Definition at line 782 of file sslctx.hpp.

◆ erase()

void openvpn::MbedTLSContext::SSL::erase ( )
inlineprivate

Definition at line 1168 of file sslctx.hpp.

Here is the caller graph for this function:

◆ export_keying_material()

bool openvpn::MbedTLSContext::SSL::export_keying_material ( const std::string &  label,
unsigned char *  ,
size_t  size 
)
inlineoverridevirtual

Implements openvpn::SSLAPI.

Definition at line 777 of file sslctx.hpp.

◆ mark_no_cache()

void openvpn::MbedTLSContext::SSL::mark_no_cache ( )
inlineoverridevirtual

Implements openvpn::SSLAPI.

Definition at line 792 of file sslctx.hpp.

◆ read_ciphertext()

BufferPtr openvpn::MbedTLSContext::SSL::read_ciphertext ( )
inlineoverridevirtual

Implements openvpn::SSLAPI.

Definition at line 760 of file sslctx.hpp.

◆ read_ciphertext_ready()

bool openvpn::MbedTLSContext::SSL::read_ciphertext_ready ( ) const
inlineoverridevirtual

Implements openvpn::SSLAPI.

Definition at line 755 of file sslctx.hpp.

◆ read_cleartext()

ssize_t openvpn::MbedTLSContext::SSL::read_cleartext ( void *  data,
const size_t  capacity 
)
inlineoverridevirtual

Implements openvpn::SSLAPI.

Definition at line 711 of file sslctx.hpp.

◆ read_cleartext_ready()

bool openvpn::MbedTLSContext::SSL::read_cleartext_ready ( ) const
inlineoverridevirtual

Implements openvpn::SSLAPI.

Definition at line 734 of file sslctx.hpp.

◆ rng_callback()

static int openvpn::MbedTLSContext::SSL::rng_callback ( void *  arg,
unsigned char *  data,
size_t  len 
)
inlinestaticprivate

Definition at line 1143 of file sslctx.hpp.

Here is the caller graph for this function:

◆ set_mbedtls_cipherlist()

void openvpn::MbedTLSContext::SSL::set_mbedtls_cipherlist ( const std::string &  cipher_list)
inlineprivate

Definition at line 1040 of file sslctx.hpp.

Here is the caller graph for this function:

◆ set_mbedtls_groups()

void openvpn::MbedTLSContext::SSL::set_mbedtls_groups ( const std::string &  tls_groups)
inlineprivate

Definition at line 1081 of file sslctx.hpp.

Here is the caller graph for this function:

◆ ssl_handshake_details()

std::string openvpn::MbedTLSContext::SSL::ssl_handshake_details ( ) const
inlineoverridevirtual

Implements openvpn::SSLAPI.

Definition at line 765 of file sslctx.hpp.

◆ start_handshake()

void openvpn::MbedTLSContext::SSL::start_handshake ( )
inlineoverridevirtual

Implements openvpn::SSLAPI.

Definition at line 690 of file sslctx.hpp.

◆ write_ciphertext()

void openvpn::MbedTLSContext::SSL::write_ciphertext ( const BufferPtr buf)
inlineoverridevirtual

Implements openvpn::SSLAPI.

Definition at line 739 of file sslctx.hpp.

◆ write_ciphertext_unbuffered()

void openvpn::MbedTLSContext::SSL::write_ciphertext_unbuffered ( const unsigned char *  data,
const size_t  size 
)
inlineoverridevirtual

Implements openvpn::SSLAPI.

Definition at line 747 of file sslctx.hpp.

◆ write_cleartext_unbuffered()

ssize_t openvpn::MbedTLSContext::SSL::write_cleartext_unbuffered ( const void *  data,
const size_t  size 
)
inlineoverridevirtual

Implements openvpn::SSLAPI.

Definition at line 695 of file sslctx.hpp.

Friends And Related Symbol Documentation

◆ MbedTLSContext

friend class MbedTLSContext
friend

Definition at line 685 of file sslctx.hpp.

Member Data Documentation

◆ allowed_ciphers

std::unique_ptr<int[]> openvpn::MbedTLSContext::SSL::allowed_ciphers
protected

Definition at line 1032 of file sslctx.hpp.

◆ authcert

AuthCert::Ptr openvpn::MbedTLSContext::SSL::authcert
private

Definition at line 1185 of file sslctx.hpp.

◆ ct_in

MemQStream openvpn::MbedTLSContext::SSL::ct_in
private

Definition at line 1183 of file sslctx.hpp.

◆ ct_out

MemQStream openvpn::MbedTLSContext::SSL::ct_out
private

Definition at line 1184 of file sslctx.hpp.

◆ epki_ctx

MbedTLSPKI::PKContext openvpn::MbedTLSContext::SSL::epki_ctx
private

Definition at line 1181 of file sslctx.hpp.

◆ groups

std::unique_ptr<mbedtls_ecp_group_id[]> openvpn::MbedTLSContext::SSL::groups
protected

Hold the array that is used for setting the allowed ciphers.

Definition at line 1034 of file sslctx.hpp.

◆ overflow

bool openvpn::MbedTLSContext::SSL::overflow
private

Definition at line 1186 of file sslctx.hpp.

◆ parent

MbedTLSContext* openvpn::MbedTLSContext::SSL::parent
protected

Hold the array that is used for setting the curves.

Definition at line 1037 of file sslctx.hpp.

◆ rng

RandomAPI::Ptr openvpn::MbedTLSContext::SSL::rng
private

Definition at line 1182 of file sslctx.hpp.

◆ ssl

mbedtls_ssl_context* openvpn::MbedTLSContext::SSL::ssl
private

Definition at line 1180 of file sslctx.hpp.

◆ sslconf

mbedtls_ssl_config* openvpn::MbedTLSContext::SSL::sslconf
protected

Definition at line 1031 of file sslctx.hpp.


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