File tree 2 files changed +12
-4
lines changed
libraries/ESP8266WiFi/src
2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 31
31
32
32
namespace BearSSL {
33
33
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 {
35
43
public:
36
44
CertStore () { };
37
45
~CertStore ();
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ class WiFiClientSecureCtx : public WiFiClient {
110
110
int getLastSSLError (char *dest = NULL , size_t len = 0 );
111
111
112
112
// Attach a preconfigured certificate store
113
- void setCertStore (CertStore *certStore) {
113
+ void setCertStore (CertStoreBase *certStore) {
114
114
_certStore = certStore;
115
115
}
116
116
@@ -140,7 +140,7 @@ class WiFiClientSecureCtx : public WiFiClient {
140
140
std::shared_ptr<unsigned char > _iobuf_out;
141
141
time_t _now;
142
142
const X509List *_ta;
143
- CertStore *_certStore;
143
+ CertStoreBase *_certStore;
144
144
int _iobuf_in_size;
145
145
int _iobuf_out_size;
146
146
bool _handshake_done;
@@ -274,7 +274,7 @@ class WiFiClientSecure : public WiFiClient {
274
274
int getLastSSLError (char *dest = NULL , size_t len = 0 ) { return _ctx->getLastSSLError (dest, len); }
275
275
276
276
// Attach a preconfigured certificate store
277
- void setCertStore (CertStore *certStore) { _ctx->setCertStore (certStore); }
277
+ void setCertStore (CertStoreBase *certStore) { _ctx->setCertStore (certStore); }
278
278
279
279
// Select specific ciphers (i.e. optimize for speed over security)
280
280
// These may be in PROGMEM or RAM, either will run properly
You can’t perform that action at this time.
0 commit comments