1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-13 13:01:55 +03:00

Allow setting client side TLS key and certificate

This commit is contained in:
Ivan Grokhotkov
2015-12-04 19:02:46 +03:00
parent 655437752b
commit 14b70e9328
4 changed files with 92 additions and 2 deletions

View File

@ -48,6 +48,22 @@ public:
int peek() override;
void stop() override;
void setCertificate(const uint8_t* cert_data, size_t size);
void setPrivateKey(const uint8_t* pk, size_t size);
bool loadCertificate(Stream& stream, size_t size);
bool loadPrivateKey(Stream& stream, size_t size);
template<typename TFile>
bool loadCertificate(TFile& file) {
return loadCertificate(file, file.size());
}
template<typename TFile>
bool loadPrivateKey(TFile& file) {
return loadPrivateKey(file, file.size());
}
protected:
int _connectSSL();