Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
SslValidatorList Class Reference
Inheritance diagram for SslValidatorList:
Vector< SslValidator >

Public Member Functions

bool add (SslValidatorCallback callback, void *data)
 
bool add (const uint8_t *fingerprint, SslFingerprintType type)
 Add a standard fingerprint validator. More...
 
bool add (SslFingerprints &fingerprints)
 Add validators for standard fingerprints. More...
 
bool validate (SSL *ssl)
 Used to validate certificate by invoking each validator callback until successful. More...
 

Private Types

typedef int(* Comparer) (const SslValidator &lhs, const SslValidator &rhs)
 

Private Member Functions

unsigned int capacity () const
 
bool contains (const SslValidator &elem) const
 
const SslValidatorfirstElement () const
 
int indexOf (const SslValidator &elem) const
 
bool isEmpty () const
 
const SslValidatorlastElement () const
 
int lastIndexOf (const SslValidator &elem) const
 
unsigned int count () const override
 
unsigned int size () const
 
void copyInto (SslValidator *array) const
 
bool add (const SslValidator &obj)
 
void addElement (const SslValidator &obj)
 
void addElement (SslValidator *objp)
 
void clear ()
 
void ensureCapacity (unsigned int minCapacity)
 
void removeAllElements ()
 
bool removeElement (const SslValidator &obj)
 
void setSize (unsigned int newSize)
 
void trimToSize ()
 
const SslValidatorelementAt (unsigned int index) const
 
void insertElementAt (const SslValidator &obj, unsigned int index)
 
const void remove (unsigned int index)
 
void removeElementAt (unsigned int index)
 
void setElementAt (const SslValidator &obj, unsigned int index)
 
const SslValidatorget (unsigned int index) const
 
const SslValidatoroperator[] (unsigned int index) const override
 
SslValidatoroperator[] (unsigned int index) override
 
void sort (Comparer compareFunction)
 
void copyFrom (const Vector &rhv)
 
const SslValidatorat (unsigned int i) const
 

Private Attributes

unsigned int _size
 
unsigned int _capacity
 
unsigned int _increment
 
SslValidator ** _data
 

Member Function Documentation

bool SslValidatorList::add ( const uint8_t *  fingerprint,
SslFingerprintType  type 
)

Add a standard fingerprint validator.

Parameters
fingerprintThe fingerprint data against which the match should be performed. Must be allocated on the heap and will be deleted after use.
typeThe fingerprint type - see SslFingerprintType for details.
Return values
booltrue on success, false on failure
bool SslValidatorList::add ( SslFingerprints fingerprints)

Add validators for standard fingerprints.

Parameters
fingerprintsWill be invalid after returning as data is moved rather than copied
Return values
booltrue on success, false on failure
bool SslValidatorList::validate ( SSL *  ssl)

Used to validate certificate by invoking each validator callback until successful.

Parameters
sslWhen called with nullptr will simply de-allocate any validator memory
Return values
booltrue on success, false on failure