diff --git a/libraries/ESP8266WiFi/src/BearSSLHelpers.h b/libraries/ESP8266WiFi/src/BearSSLHelpers.h index 397a55752..3033a80ae 100644 --- a/libraries/ESP8266WiFi/src/BearSSLHelpers.h +++ b/libraries/ESP8266WiFi/src/BearSSLHelpers.h @@ -58,6 +58,7 @@ class PublicKey { // Disable the copy constructor, we're pointer based PublicKey(const PublicKey& that) = delete; + PublicKey& operator=(const PublicKey& that) = delete; private: brssl::public_key *_key; @@ -86,6 +87,7 @@ class PrivateKey { // Disable the copy constructor, we're pointer based PrivateKey(const PrivateKey& that) = delete; + PrivateKey& operator=(const PrivateKey& that) = delete; private: brssl::private_key *_key; @@ -122,6 +124,7 @@ class X509List { // Disable the copy constructor, we're pointer based X509List(const X509List& that) = delete; + X509List& operator=(const X509List& that) = delete; private: size_t _count; diff --git a/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.h b/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.h index 8a77648d9..afdb0c0a7 100644 --- a/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.h +++ b/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.h @@ -34,7 +34,7 @@ namespace BearSSL { class WiFiClientSecureCtx : public WiFiClient { public: WiFiClientSecureCtx(); - WiFiClientSecureCtx(const WiFiClientSecure &rhs) = delete; + WiFiClientSecureCtx(const WiFiClientSecureCtx &rhs) = delete; ~WiFiClientSecureCtx() override; WiFiClientSecureCtx& operator=(const WiFiClientSecureCtx&) = delete; @@ -43,7 +43,7 @@ class WiFiClientSecureCtx : public WiFiClient { // TODO: don't remove just yet to avoid including the WiFiClient default implementation and unintentionally causing // a 'slice' that this method tries to avoid in the first place std::unique_ptr clone() const override { - return std::unique_ptr(new WiFiClientSecureCtx(*this)); + return nullptr; } int connect(IPAddress ip, uint16_t port) override;