mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-12 01:53:07 +03:00
Move BearSSLHelpers into BearSSL namespace (#5315)
BearSSLX509List, BearSSLSession, BearSSLPublicKey, and BearSSLPrivateKey were all in the global namespace and not in the BearSSL:: one, due to an oversight when they were originally created. Move them to the proper namespace with the following mapping: BearSSLX509List => BearSSL::X509List BearSSLSession => BearSSL::Session BearSSLPublicKey => BearSSL::PublicKey BearSSLPrivateKey => BearSSL::PrivateKey
This commit is contained in:
committed by
GitHub
parent
a42c3c399b
commit
233d3e3b5e
@ -46,12 +46,12 @@ ESP8266WebServerSecure::ESP8266WebServerSecure(int port)
|
||||
{
|
||||
}
|
||||
|
||||
void ESP8266WebServerSecure::setRSACert(const BearSSLX509List *chain, const BearSSLPrivateKey *sk)
|
||||
void ESP8266WebServerSecure::setRSACert(const X509List *chain, const PrivateKey *sk)
|
||||
{
|
||||
_serverSecure.setRSACert(chain, sk);
|
||||
}
|
||||
|
||||
void ESP8266WebServerSecure::setECCert(const BearSSLX509List *chain, unsigned cert_issuer_key_type, const BearSSLPrivateKey *sk)
|
||||
void ESP8266WebServerSecure::setECCert(const X509List *chain, unsigned cert_issuer_key_type, const PrivateKey *sk)
|
||||
{
|
||||
_serverSecure.setECCert(chain, cert_issuer_key_type, sk);
|
||||
}
|
||||
@ -83,7 +83,7 @@ void ESP8266WebServerSecure::begin() {
|
||||
|
||||
void ESP8266WebServerSecure::handleClient() {
|
||||
if (_currentStatus == HC_NONE) {
|
||||
BearSSL::WiFiClientSecure client = _serverSecure.available();
|
||||
WiFiClientSecure client = _serverSecure.available();
|
||||
if (!client) {
|
||||
return;
|
||||
}
|
||||
@ -136,7 +136,7 @@ void ESP8266WebServerSecure::handleClient() {
|
||||
}
|
||||
|
||||
if (!keepCurrentClient) {
|
||||
_currentClientSecure = BearSSL::WiFiClientSecure();
|
||||
_currentClientSecure = WiFiClientSecure();
|
||||
_currentStatus = HC_NONE;
|
||||
_currentUpload.reset();
|
||||
}
|
||||
|
@ -37,8 +37,8 @@ public:
|
||||
virtual ~ESP8266WebServerSecure();
|
||||
|
||||
void setBufferSizes(int recv, int xmit);
|
||||
void setRSACert(const BearSSLX509List *chain, const BearSSLPrivateKey *sk);
|
||||
void setECCert(const BearSSLX509List *chain, unsigned cert_issuer_key_type, const BearSSLPrivateKey *sk);
|
||||
void setRSACert(const X509List *chain, const PrivateKey *sk);
|
||||
void setECCert(const X509List *chain, unsigned cert_issuer_key_type, const PrivateKey *sk);
|
||||
|
||||
WiFiClient client() override { return _currentClientSecure; }
|
||||
|
||||
@ -61,8 +61,8 @@ private:
|
||||
size_t _currentClientWrite_P (PGM_P bytes, size_t len) override { return _currentClientSecure.write_P(bytes, len); }
|
||||
|
||||
protected:
|
||||
BearSSL::WiFiServerSecure _serverSecure;
|
||||
BearSSL::WiFiClientSecure _currentClientSecure;
|
||||
WiFiServerSecure _serverSecure;
|
||||
WiFiClientSecure _currentClientSecure;
|
||||
};
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user