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

#include <sslctx.hpp>

Inheritance diagram for openvpn::OpenSSLContext::SSL:
[legend]
Collaboration diagram for openvpn::OpenSSLContext::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 *dest, size_t size) override
 
bool did_full_handshake () override
 Returns the cached/reused status of the session.
 
const AuthCert::Ptrauth_cert () const override
 
void mark_no_cache () override
 
 ~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.
 

Static Public Member Functions

static void init_static ()
 
- 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.
 

Private Member Functions

 SSL (const OpenSSLContext &ctx, const std::string *hostname, const std::string *cache_key)
 
void set_parent (const OpenSSLContext *ctx)
 
void rebuild_authcert () const
 
void ssl_clear ()
 
void ssl_erase ()
 

Static Private Member Functions

static int ssl_pending_override (const ::SSL *)
 
static void print_ec_key_details (EVP_PKEY *pkey, std::ostream &os)
 
static std::string ssl_handshake_details (const ::SSL *c_ssl)
 
static BIO * mem_bio (const Frame::Ptr &frame)
 

Private Attributes

::SSLssl
 
BIO * ssl_bio
 
BIO * ct_in
 
BIO * ct_out
 
AuthCert::Ptr authcert
 
OpenSSLSessionCache::Key::UPtr sess_cache_key
 
OpenSSLContext::Ptr sni_ctx
 
bool ssl_bio_linkage
 
bool overflow
 
bool called_did_full_handshake
 

Static Private Attributes

static int ssl_data_index = -1
 
static int context_data_index = -1
 

Friends

class OpenSSLContext
 

Additional Inherited Members

- Protected Attributes inherited from openvpn::SSLAPI
uint32_t tls_warnings = 0
 

Detailed Description

Definition at line 785 of file sslctx.hpp.

Member Typedef Documentation

◆ Ptr

Definition at line 790 of file sslctx.hpp.

Constructor & Destructor Documentation

◆ ~SSL()

openvpn::OpenSSLContext::SSL::~SSL ( )
inline

Definition at line 906 of file sslctx.hpp.

◆ SSL()

openvpn::OpenSSLContext::SSL::SSL ( const OpenSSLContext ctx,
const std::string *  hostname,
const std::string *  cache_key 
)
inlineprivate

Definition at line 924 of file sslctx.hpp.

Member Function Documentation

◆ auth_cert()

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

Implements openvpn::SSLAPI.

Definition at line 892 of file sslctx.hpp.

◆ did_full_handshake()

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

Returns the cached/reused status of the session.

Returns
true if we did a full SSL handshake/negotiation or if the handshake attempt failed with an exception.
false for cached, reused, or persisted sessions or if previously called on this session.

Implements openvpn::SSLAPI.

Definition at line 884 of file sslctx.hpp.

◆ export_keying_material()

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

Implements openvpn::SSLAPI.

Definition at line 874 of file sslctx.hpp.

◆ init_static()

static void openvpn::OpenSSLContext::SSL::init_static ( )
inlinestatic

Definition at line 911 of file sslctx.hpp.

Here is the caller graph for this function:

◆ mark_no_cache()

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

Implements openvpn::SSLAPI.

Definition at line 901 of file sslctx.hpp.

Here is the caller graph for this function:

◆ mem_bio()

static BIO * openvpn::OpenSSLContext::SSL::mem_bio ( const Frame::Ptr frame)
inlinestaticprivate

Definition at line 1152 of file sslctx.hpp.

Here is the caller graph for this function:

◆ print_ec_key_details()

static void openvpn::OpenSSLContext::SSL::print_ec_key_details ( EVP_PKEY *  pkey,
std::ostream &  os 
)
inlinestaticprivate

Definition at line 1043 of file sslctx.hpp.

Here is the caller graph for this function:

◆ read_ciphertext()

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

Implements openvpn::SSLAPI.

Definition at line 864 of file sslctx.hpp.

◆ read_ciphertext_ready()

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

Implements openvpn::SSLAPI.

Definition at line 859 of file sslctx.hpp.

◆ read_cleartext()

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

Implements openvpn::SSLAPI.

Definition at line 814 of file sslctx.hpp.

◆ read_cleartext_ready()

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

Implements openvpn::SSLAPI.

Definition at line 836 of file sslctx.hpp.

◆ rebuild_authcert()

void openvpn::OpenSSLContext::SSL::rebuild_authcert ( ) const
inlineprivate

Definition at line 1014 of file sslctx.hpp.

Here is the caller graph for this function:

◆ set_parent()

void openvpn::OpenSSLContext::SSL::set_parent ( const OpenSSLContext ctx)
inlineprivate

Definition at line 1007 of file sslctx.hpp.

Here is the caller graph for this function:

◆ ssl_clear()

void openvpn::OpenSSLContext::SSL::ssl_clear ( )
inlineprivate

Definition at line 1119 of file sslctx.hpp.

Here is the caller graph for this function:

◆ ssl_erase()

void openvpn::OpenSSLContext::SSL::ssl_erase ( )
inlineprivate

Definition at line 1131 of file sslctx.hpp.

Here is the caller graph for this function:

◆ ssl_handshake_details() [1/2]

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

Implements openvpn::SSLAPI.

Definition at line 869 of file sslctx.hpp.

Here is the caller graph for this function:

◆ ssl_handshake_details() [2/2]

static std::string openvpn::OpenSSLContext::SSL::ssl_handshake_details ( const ::SSL c_ssl)
inlinestaticprivate

Definition at line 1057 of file sslctx.hpp.

◆ ssl_pending_override()

static int openvpn::OpenSSLContext::SSL::ssl_pending_override ( const ::SSL )
inlinestaticprivate

Definition at line 1038 of file sslctx.hpp.

◆ start_handshake()

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

Implements openvpn::SSLAPI.

Definition at line 792 of file sslctx.hpp.

◆ write_ciphertext()

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

Implements openvpn::SSLAPI.

Definition at line 841 of file sslctx.hpp.

◆ write_ciphertext_unbuffered()

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

Implements openvpn::SSLAPI.

Definition at line 850 of file sslctx.hpp.

◆ write_cleartext_unbuffered()

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

Implements openvpn::SSLAPI.

Definition at line 797 of file sslctx.hpp.

Friends And Related Symbol Documentation

◆ OpenSSLContext

friend class OpenSSLContext
friend

Definition at line 787 of file sslctx.hpp.

Member Data Documentation

◆ authcert

AuthCert::Ptr openvpn::OpenSSLContext::SSL::authcert
private

Definition at line 1165 of file sslctx.hpp.

◆ called_did_full_handshake

bool openvpn::OpenSSLContext::SSL::called_did_full_handshake
private

Definition at line 1170 of file sslctx.hpp.

◆ context_data_index

int openvpn::OpenSSLContext::SSL::context_data_index = -1
inlinestaticprivate

Definition at line 1174 of file sslctx.hpp.

◆ ct_in

BIO* openvpn::OpenSSLContext::SSL::ct_in
private

Definition at line 1163 of file sslctx.hpp.

◆ ct_out

BIO* openvpn::OpenSSLContext::SSL::ct_out
private

Definition at line 1164 of file sslctx.hpp.

◆ overflow

bool openvpn::OpenSSLContext::SSL::overflow
private

Definition at line 1169 of file sslctx.hpp.

◆ sess_cache_key

OpenSSLSessionCache::Key::UPtr openvpn::OpenSSLContext::SSL::sess_cache_key
private

Definition at line 1166 of file sslctx.hpp.

◆ sni_ctx

OpenSSLContext::Ptr openvpn::OpenSSLContext::SSL::sni_ctx
private

Definition at line 1167 of file sslctx.hpp.

◆ ssl

::SSL* openvpn::OpenSSLContext::SSL::ssl
private

Definition at line 1161 of file sslctx.hpp.

◆ ssl_bio

BIO* openvpn::OpenSSLContext::SSL::ssl_bio
private

Definition at line 1162 of file sslctx.hpp.

◆ ssl_bio_linkage

bool openvpn::OpenSSLContext::SSL::ssl_bio_linkage
private

Definition at line 1168 of file sslctx.hpp.

◆ ssl_data_index

int openvpn::OpenSSLContext::SSL::ssl_data_index = -1
inlinestaticprivate

Definition at line 1173 of file sslctx.hpp.


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