Go to the documentation of this file.
25 return key && certificate;
39 unsigned newCertificateLength,
const char* newKeyPassword =
nullptr);
41 bool assign(
String newKey,
String newCertificate,
const char* newKeyPassword =
nullptr)
44 certificate = newCertificate;
45 return key && certificate && setPassword(newKeyPassword);
57 return (key == keyCert.key) && (keyPassword == keyCert.keyPassword) && (certificate == keyCert.certificate);
63 keyPassword =
nullptr;
64 certificate =
nullptr;
79 return keyPassword.
c_str();
84 return reinterpret_cast<const uint8_t*
>(certificate.
c_str());
89 return certificate.
length();
93 bool setPassword(
const char* newKeyPassword);
const char * getKeyPassword() const
Definition: KeyCertPair.h:93
const uint8_t * getCertificate() const
Definition: KeyCertPair.h:98
The String class.
Definition: WString.h:136
const uint8_t * getKey() const
Definition: KeyCertPair.h:83
bool isValid() const
Definition: KeyCertPair.h:39
unsigned getCertificateLength() const
Definition: KeyCertPair.h:103
Class to manage an SSL key certificate with optional password.
Definition: KeyCertPair.h:28
void free()
Definition: KeyCertPair.h:76
const char * c_str() const
Get a constant (un-modifiable) pointer to String content.
Definition: WString.h:616
bool assign(const uint8_t *newKey, unsigned newKeyLength, const uint8_t *newCertificate, unsigned newCertificateLength, const char *newKeyPassword=nullptr)
Create certificate using provided values.
unsigned getKeyLength() const
Definition: KeyCertPair.h:88
size_t length(void) const
Obtain the String length in characters, excluding NUL terminator.
Definition: WString.h:243