Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
SslKeyCertPair Class Reference

Class to manage an SSL key certificate with optional password. More...

#include <SslKeyCertPair.h>

Public Member Functions

bool isValid ()
 
bool assign (const uint8_t *newKey, unsigned newKeyLength, const uint8_t *newCertificate, unsigned newCertificateLength, const char *newKeyPassword=nullptr)
 Create certificate using provided values. More...
 
bool assign (const SslKeyCertPair &keyCert)
 Assign another certificate to this structure. More...
 
void free ()
 
const uint8_t * getKey ()
 
unsigned getKeyLength ()
 
const char * getKeyPassword ()
 
const uint8_t * getCertificate ()
 
unsigned getCertificateLength ()
 

Detailed Description

Class to manage an SSL key certificate with optional password.

Member Function Documentation

bool SslKeyCertPair::assign ( const uint8_t *  newKey,
unsigned  newKeyLength,
const uint8_t *  newCertificate,
unsigned  newCertificateLength,
const char *  newKeyPassword = nullptr 
)
inline

Create certificate using provided values.

Parameters
newKey
newKeyLength
newCertificate
newCertificateLength
newKeyPassword
Return values
boolfalse on memory allocation failure
Note
We take a new copy of the certificate
bool SslKeyCertPair::assign ( const SslKeyCertPair keyCert)
inline

Assign another certificate to this structure.

Parameters
keyCert
Return values
boolfalse on memory allocation failure
Note
We take a new copy of the certificate