File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
libraries/ESP8266WiFi/src Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 3131
3232namespace BearSSL {
3333
34- class CertStore {
34+ class CertStoreBase {
35+ public:
36+ virtual ~CertStoreBase () {}
37+
38+ // Installs the cert store into the X509 decoder (normally via static function callbacks)
39+ virtual void installCertStore (br_x509_minimal_context *ctx) = 0;
40+ };
41+
42+ class CertStore : public CertStoreBase {
3543 public:
3644 CertStore () { };
3745 ~CertStore ();
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ class WiFiClientSecureCtx : public WiFiClient {
110110 int getLastSSLError (char *dest = NULL , size_t len = 0 );
111111
112112 // Attach a preconfigured certificate store
113- void setCertStore (CertStore *certStore) {
113+ void setCertStore (CertStoreBase *certStore) {
114114 _certStore = certStore;
115115 }
116116
@@ -140,7 +140,7 @@ class WiFiClientSecureCtx : public WiFiClient {
140140 std::shared_ptr<unsigned char > _iobuf_out;
141141 time_t _now;
142142 const X509List *_ta;
143- CertStore *_certStore;
143+ CertStoreBase *_certStore;
144144 int _iobuf_in_size;
145145 int _iobuf_out_size;
146146 bool _handshake_done;
@@ -274,7 +274,7 @@ class WiFiClientSecure : public WiFiClient {
274274 int getLastSSLError (char *dest = NULL , size_t len = 0 ) { return _ctx->getLastSSLError (dest, len); }
275275
276276 // Attach a preconfigured certificate store
277- void setCertStore (CertStore *certStore) { _ctx->setCertStore (certStore); }
277+ void setCertStore (CertStoreBase *certStore) { _ctx->setCertStore (certStore); }
278278
279279 // Select specific ciphers (i.e. optimize for speed over security)
280280 // These may be in PROGMEM or RAM, either will run properly
You can’t perform that action at this time.
0 commit comments