mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-30 16:24:09 +03:00
WiFiClientSecure: add option to allow self-signed certificates
Mainly useful for testing WiFiClientSecure in local environments. If allowSelfSignedCerts is called before verifyCertChain, then the certificate chain will be verified, but the final certificate may be self-signed.
This commit is contained in:
@ -62,6 +62,8 @@ public:
|
||||
bool loadCertificate(Stream& stream, size_t size);
|
||||
bool loadPrivateKey(Stream& stream, size_t size);
|
||||
|
||||
void allowSelfSignedCerts();
|
||||
|
||||
template<typename TFile>
|
||||
bool loadCertificate(TFile& file) {
|
||||
return loadCertificate(file, file.size());
|
||||
@ -79,6 +81,7 @@ public:
|
||||
|
||||
|
||||
protected:
|
||||
void _initSSLContext();
|
||||
int _connectSSL(const char* hostName);
|
||||
bool _verifyDN(const char* name);
|
||||
|
||||
|
Reference in New Issue
Block a user