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

#include <error.hpp>

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

Public Types

enum  { MAX_ERRORS = 8 }
 

Public Member Functions

 OPENVPN_EXCEPTION (ssl_exception_index)
 
 OpenSSLException ()
 
 OpenSSLException (const std::string &error_text) noexcept
 
 OpenSSLException (const int ssl_error)
 
 OpenSSLException (const std::string &error_text, const int ssl_error)
 
const char * what () const noexcept override
 
std::string what_str () const
 
size_t len () const
 
unsigned long operator[] (const size_t i) const
 
int ssl_error () const
 
virtual ~OpenSSLException () noexcept=default
 
- Public Member Functions inherited from openvpn::ExceptionCode
 ExceptionCode ()=default
 
 ExceptionCode (const Error::Type code)
 
 ExceptionCode (const Error::Type code, const bool fatal)
 
void set_code (const Error::Type code)
 
void set_code (const Error::Type code, const bool fatal)
 
Error::Type code () const
 
bool fatal () const
 
bool code_defined () const
 
bool is_tls_alert () const
 Some errors may justify letting the underlying SSL library send out TLS alerts.
 
virtual ~ExceptionCode () noexcept=default
 

Static Public Member Functions

static const char * ssl_error_text (const int ssl_error, bool *unknown=nullptr)
 

Private Member Functions

void init_error (const char *error_text)
 
void init_ssl_error (const int ssl_error, const char *error_text)
 

Private Attributes

size_t n_err
 
unsigned long errstack [MAX_ERRORS]
 
std::string errtxt
 
int ssl_err
 

Detailed Description

Definition at line 29 of file error.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
MAX_ERRORS 

Definition at line 34 of file error.hpp.

Constructor & Destructor Documentation

◆ OpenSSLException() [1/4]

openvpn::OpenSSLException::OpenSSLException ( )
inline

Definition at line 39 of file error.hpp.

◆ OpenSSLException() [2/4]

openvpn::OpenSSLException::OpenSSLException ( const std::string &  error_text)
inlineexplicitnoexcept

Definition at line 45 of file error.hpp.

◆ OpenSSLException() [3/4]

openvpn::OpenSSLException::OpenSSLException ( const int  ssl_error)
inlineexplicit

Definition at line 51 of file error.hpp.

◆ OpenSSLException() [4/4]

openvpn::OpenSSLException::OpenSSLException ( const std::string &  error_text,
const int  ssl_error 
)
inlineexplicit

Definition at line 56 of file error.hpp.

◆ ~OpenSSLException()

virtual openvpn::OpenSSLException::~OpenSSLException ( )
virtualdefaultnoexcept

Member Function Documentation

◆ init_error()

void openvpn::OpenSSLException::init_error ( const char *  error_text)
inlineprivate

Definition at line 119 of file error.hpp.

Here is the caller graph for this function:

◆ init_ssl_error()

void openvpn::OpenSSLException::init_ssl_error ( const int  ssl_error,
const char *  error_text 
)
inlineprivate

Definition at line 207 of file error.hpp.

Here is the caller graph for this function:

◆ len()

size_t openvpn::OpenSSLException::len ( ) const
inline

Definition at line 70 of file error.hpp.

◆ OPENVPN_EXCEPTION()

openvpn::OpenSSLException::OPENVPN_EXCEPTION ( ssl_exception_index  )

◆ operator[]()

unsigned long openvpn::OpenSSLException::operator[] ( const size_t  i) const
inline

Definition at line 74 of file error.hpp.

◆ ssl_error()

int openvpn::OpenSSLException::ssl_error ( ) const
inline

Definition at line 82 of file error.hpp.

Here is the caller graph for this function:

◆ ssl_error_text()

static const char * openvpn::OpenSSLException::ssl_error_text ( const int  ssl_error,
bool *  unknown = nullptr 
)
inlinestatic

Definition at line 89 of file error.hpp.

Here is the caller graph for this function:

◆ what()

const char * openvpn::OpenSSLException::what ( ) const
inlineoverridenoexcept

Definition at line 61 of file error.hpp.

◆ what_str()

std::string openvpn::OpenSSLException::what_str ( ) const
inline

Definition at line 65 of file error.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ errstack

unsigned long openvpn::OpenSSLException::errstack[MAX_ERRORS]
private

Definition at line 228 of file error.hpp.

◆ errtxt

std::string openvpn::OpenSSLException::errtxt
private

Definition at line 229 of file error.hpp.

◆ n_err

size_t openvpn::OpenSSLException::n_err
private

Definition at line 227 of file error.hpp.

◆ ssl_err

int openvpn::OpenSSLException::ssl_err
private

Definition at line 230 of file error.hpp.


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