mirror of
https://github.com/esp8266/Arduino.git
synced 2025-08-20 05:03:14 +03:00
WiFiClientSecure: certificate loading refactoring, support for CA root cert verification
This commit is contained in:
@@ -39,6 +39,7 @@ public:
|
||||
int connect(const char* name, uint16_t port) override;
|
||||
|
||||
bool verify(const char* fingerprint, const char* domain_name);
|
||||
bool verifyCertChain(const char* domain_name);
|
||||
|
||||
uint8_t connected() override;
|
||||
size_t write(const uint8_t *buf, size_t size) override;
|
||||
@@ -54,6 +55,7 @@ public:
|
||||
|
||||
bool loadCertificate(Stream& stream, size_t size);
|
||||
bool loadPrivateKey(Stream& stream, size_t size);
|
||||
bool loadCACert(Stream& stream, size_t size);
|
||||
|
||||
template<typename TFile>
|
||||
bool loadCertificate(TFile& file) {
|
||||
@@ -67,6 +69,7 @@ public:
|
||||
|
||||
protected:
|
||||
int _connectSSL(const char* hostName);
|
||||
bool _verifyDN(const char* name);
|
||||
|
||||
SSLContext* _ssl = nullptr;
|
||||
};
|
||||
|
Reference in New Issue
Block a user