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

#include <authcert.hpp>

Public Member Functions

 OPENVPN_EXCEPTION (serial_number_error)
 
 Serial ()
 
 Serial (const std::int64_t sn)
 
 Serial (const std::string &sn_str)
 
bool defined () const
 
std::int64_t as_int64 () const
 
bool operator== (const Serial &other) const
 
bool operator!= (const Serial &other) const
 
std::string to_string () const
 
const std::uint8_t * number () const
 
std::uint8_t * number ()
 

Static Public Member Functions

static std::string to_string (const std::uint8_t *serial_number)
 
static constexpr size_t size ()
 

Private Member Functions

std::uint8_t parse_hex (const char c)
 
void init_from_int64 (const std::int64_t sn)
 
void init_from_string (const std::string &sn_str)
 

Private Attributes

union { 
 
   std::uint8_t   serial_number [20] 
 
   std::uint32_t   serial_number32 [5] 
 
};  
 

Detailed Description

Definition at line 136 of file authcert.hpp.

Constructor & Destructor Documentation

◆ Serial() [1/3]

openvpn::AuthCert::Serial::Serial ( )
inline

Definition at line 141 of file authcert.hpp.

◆ Serial() [2/3]

openvpn::AuthCert::Serial::Serial ( const std::int64_t  sn)
inline

Definition at line 146 of file authcert.hpp.

◆ Serial() [3/3]

openvpn::AuthCert::Serial::Serial ( const std::string &  sn_str)
inline

Definition at line 151 of file authcert.hpp.

Member Function Documentation

◆ as_int64()

std::int64_t openvpn::AuthCert::Serial::as_int64 ( ) const
inline

Definition at line 185 of file authcert.hpp.

Here is the caller graph for this function:

◆ defined()

bool openvpn::AuthCert::Serial::defined ( ) const
inline

Definition at line 177 of file authcert.hpp.

Here is the caller graph for this function:

◆ init_from_int64()

void openvpn::AuthCert::Serial::init_from_int64 ( const std::int64_t  sn)
inlineprivate

Definition at line 259 of file authcert.hpp.

Here is the caller graph for this function:

◆ init_from_string()

void openvpn::AuthCert::Serial::init_from_string ( const std::string &  sn_str)
inlineprivate

Definition at line 273 of file authcert.hpp.

Here is the caller graph for this function:

◆ number() [1/2]

std::uint8_t * openvpn::AuthCert::Serial::number ( )
inline

Definition at line 240 of file authcert.hpp.

◆ number() [2/2]

const std::uint8_t * openvpn::AuthCert::Serial::number ( ) const
inline

Definition at line 235 of file authcert.hpp.

Here is the caller graph for this function:

◆ OPENVPN_EXCEPTION()

openvpn::AuthCert::Serial::OPENVPN_EXCEPTION ( serial_number_error  )

◆ operator!=()

bool openvpn::AuthCert::Serial::operator!= ( const Serial other) const
inline

Definition at line 205 of file authcert.hpp.

◆ operator==()

bool openvpn::AuthCert::Serial::operator== ( const Serial other) const
inline

Definition at line 200 of file authcert.hpp.

Here is the caller graph for this function:

◆ parse_hex()

std::uint8_t openvpn::AuthCert::Serial::parse_hex ( const char  c)
inlineprivate

Definition at line 251 of file authcert.hpp.

Here is the caller graph for this function:

◆ size()

static constexpr size_t openvpn::AuthCert::Serial::size ( )
inlinestaticconstexpr

Definition at line 245 of file authcert.hpp.

Here is the caller graph for this function:

◆ to_string() [1/2]

std::string openvpn::AuthCert::Serial::to_string ( ) const
inline

Definition at line 210 of file authcert.hpp.

Here is the caller graph for this function:

◆ to_string() [2/2]

static std::string openvpn::AuthCert::Serial::to_string ( const std::uint8_t *  serial_number)
inlinestatic

Definition at line 215 of file authcert.hpp.

Member Data Documentation

◆ [union]

◆ serial_number

std::uint8_t openvpn::AuthCert::Serial::serial_number[20]

Definition at line 335 of file authcert.hpp.

◆ serial_number32

std::uint32_t openvpn::AuthCert::Serial::serial_number32[5]

Definition at line 336 of file authcert.hpp.


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