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 135 of file authcert.hpp.

Constructor & Destructor Documentation

◆ Serial() [1/3]

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

Definition at line 140 of file authcert.hpp.

◆ Serial() [2/3]

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

Definition at line 145 of file authcert.hpp.

◆ Serial() [3/3]

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

Definition at line 150 of file authcert.hpp.

Member Function Documentation

◆ as_int64()

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

Definition at line 184 of file authcert.hpp.

Here is the caller graph for this function:

◆ defined()

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

Definition at line 176 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 258 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 272 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 239 of file authcert.hpp.

◆ number() [2/2]

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

Definition at line 234 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 204 of file authcert.hpp.

◆ operator==()

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

Definition at line 199 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 250 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 244 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 209 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 214 of file authcert.hpp.

Member Data Documentation

◆ [union]

◆ serial_number

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

Definition at line 334 of file authcert.hpp.

◆ serial_number32

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

Definition at line 335 of file authcert.hpp.


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