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

Contains SSL fingerprint data. More...

#include <SslFingerprints.h>

Public Member Functions

void free ()
 
bool setSha1 (const uint8_t *cert, unsigned length)
 Set the SHA1 fingerprint. More...
 
bool setSha1_P (const uint8_t *cert, unsigned length)
 Make copy of SHA1 certificate from data stored in flash. More...
 
bool setSha256 (const uint8_t *cert, unsigned length)
 Set the SHA256 fingerprint. More...
 
bool setSha256_P (const uint8_t *cert, unsigned length)
 Make copy of SHA256 certificate from data stored in flash. More...
 
SslFingerprintsoperator= (SslFingerprints &source)
 Moves values out of source. More...
 
SslFingerprintsoperator= (const SslFingerprints &source)
 Make copy of values from source. More...
 

Public Attributes

const uint8_t * certSha1 = nullptr
 certificate SHA1 fingerprint More...
 
const uint8_t * pkSha256 = nullptr
 public key SHA256 fingerprint More...
 

Detailed Description

Contains SSL fingerprint data.

Note
Lifetime as follows:
  • Constructed by application, using appropriate setXXX method;
  • Passed into HttpRequest by application, using pinCertificate method - request is then queued;
  • Passed into HttpClientConnection (TcpClient descendant) by HttpClient, using pinCertificate method
  • When certificate validated, memory is released

Member Function Documentation

SslFingerprints& SslFingerprints::operator= ( SslFingerprints source)

Moves values out of source.

SslFingerprints& SslFingerprints::operator= ( const SslFingerprints source)

Make copy of values from source.

bool SslFingerprints::setSha1 ( const uint8_t *  cert,
unsigned  length 
)
inline

Set the SHA1 fingerprint.

Parameters
certdata to copy
lengthfor checking
Return values
boolfalse on length check or allocation failure
bool SslFingerprints::setSha1_P ( const uint8_t *  cert,
unsigned  length 
)
inline

Make copy of SHA1 certificate from data stored in flash.

bool SslFingerprints::setSha256 ( const uint8_t *  cert,
unsigned  length 
)
inline

Set the SHA256 fingerprint.

Parameters
certdata to copy
lengthfor checking
Return values
boolfalse on length check or allocation failure
bool SslFingerprints::setSha256_P ( const uint8_t *  cert,
unsigned  length 
)
inline

Make copy of SHA256 certificate from data stored in flash.

Member Data Documentation

const uint8_t* SslFingerprints::certSha1 = nullptr

certificate SHA1 fingerprint

const uint8_t* SslFingerprints::pkSha256 = nullptr

public key SHA256 fingerprint