sptk2 logo
SPTK Home Page
Public Member Functions | List of all members
sptk::SSLKeys Class Reference

Public Member Functions

 SSLKeys ()=default
 
 SSLKeys (String privateKeyFileName, String certificateFileName, String password="", String caFileName="", int verifyMode=SSL_VERIFY_NONE, int verifyDepth=0)
 
 SSLKeys (const SSLKeys &other)
 
SSLKeysoperator= (const SSLKeys &other)
 
 ~SSLKeys () noexcept=default
 
String ident () const
 
String privateKeyFileName () const
 
String certificateFileName () const
 
String password () const
 
String caFileName () const
 
int verifyMode () const
 
int verifyDepth () const
 
bool empty () const
 

Constructor & Destructor Documentation

◆ SSLKeys() [1/3]

sptk::SSLKeys::SSLKeys ( )
default

Default constructor

◆ SSLKeys() [2/3]

sptk::SSLKeys::SSLKeys ( String  privateKeyFileName,
String  certificateFileName,
String  password = "",
String  caFileName = "",
int  verifyMode = SSL_VERIFY_NONE,
int  verifyDepth = 0 
)

Constructor

Private key and certificates must be encoded with PEM format. A single file containing private key and certificate can be used by supplying it for both, private key and certificate parameters. If private key is protected with password, then password can be supplied to auto-answer.

Parameters
privateKeyFileNamePrivate key file name
certificateFileNameCertificate file name
passwordKey file password
caFileNameOptional CA (root certificate) file name
verifyModeEther SSL_VERIFY_NONE, or SSL_VERIFY_PEER, for server can be ored with SSL_VERIFY_FAIL_IF_NO_PEER_CERT and/or SSL_VERIFY_CLIENT_ONCE
verifyDepthConnection verify depth

◆ SSLKeys() [3/3]

sptk::SSLKeys::SSLKeys ( const SSLKeys other)

Copy constructor

Parameters
otherThe other object

◆ ~SSLKeys()

sptk::SSLKeys::~SSLKeys ( )
defaultnoexcept

Destructor

Member Function Documentation

◆ caFileName()

String sptk::SSLKeys::caFileName ( ) const
Returns
certificate authority file name

◆ certificateFileName()

String sptk::SSLKeys::certificateFileName ( ) const
Returns
certificate file name

◆ ident()

String sptk::SSLKeys::ident ( ) const

Unique SSL keys identifier, for SSL keys index

Returns
SSL keys identifier

◆ operator=()

SSLKeys & sptk::SSLKeys::operator= ( const SSLKeys other)

Copy assignment

Parameters
otherThe other object

◆ password()

String sptk::SSLKeys::password ( ) const
Returns
private key password

◆ privateKeyFileName()

String sptk::SSLKeys::privateKeyFileName ( ) const
Returns
private key file name

◆ verifyDepth()

int sptk::SSLKeys::verifyDepth ( ) const
Returns
number of certificates to verify

◆ verifyMode()

int sptk::SSLKeys::verifyMode ( ) const
Returns
verify mode

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

Fri Oct 14 2022 09:58:45: SPTK 5.4.1