Skip to content

Commit 996211f

Browse files
authored
Compile failure fix with FS_NO_GLOBALS flag (#7685)
1 parent 77bd71e commit 996211f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

libraries/ESP8266WiFi/src/CertStoreBearSSL.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ CertStore::CertInfo CertStore::_preprocessCert(uint32_t length, uint32_t offset,
8080

8181
// The certs.ar file is a UNIX ar format file, concatenating all the
8282
// individual certificates into a single blob in a space-efficient way.
83-
int CertStore::initCertStore(FS &fs, const char *indexFileName, const char *dataFileName) {
83+
int CertStore::initCertStore(fs::FS &fs, const char *indexFileName, const char *dataFileName) {
8484
int count = 0;
8585
uint32_t offset = 0;
8686

@@ -101,12 +101,12 @@ int CertStore::initCertStore(FS &fs, const char *indexFileName, const char *data
101101
memcpy_P(_indexName, indexFileName, strlen_P(indexFileName) + 1);
102102
memcpy_P(_dataName, dataFileName, strlen_P(dataFileName) + 1);
103103

104-
File index = _fs->open(_indexName, "w");
104+
fs::File index = _fs->open(_indexName, "w");
105105
if (!index) {
106106
return 0;
107107
}
108108

109-
File data = _fs->open(_dataName, "r");
109+
fs::File data = _fs->open(_dataName, "r");
110110
if (!data) {
111111
index.close();
112112
return 0;
@@ -179,7 +179,7 @@ const br_x509_trust_anchor *CertStore::findHashedTA(void *ctx, void *hashed_dn,
179179
return nullptr;
180180
}
181181

182-
File index = cs->_fs->open(cs->_indexName, "r");
182+
fs::File index = cs->_fs->open(cs->_indexName, "r");
183183
if (!index) {
184184
return nullptr;
185185
}
@@ -191,12 +191,12 @@ const br_x509_trust_anchor *CertStore::findHashedTA(void *ctx, void *hashed_dn,
191191
if (!der) {
192192
return nullptr;
193193
}
194-
File data = cs->_fs->open(cs->_dataName, "r");
194+
fs::File data = cs->_fs->open(cs->_dataName, "r");
195195
if (!data) {
196196
free(der);
197197
return nullptr;
198198
}
199-
if (!data.seek(ci.offset, SeekSet)) {
199+
if (!data.seek(ci.offset, fs::SeekSet)) {
200200
data.close();
201201
free(der);
202202
return nullptr;

0 commit comments

Comments
 (0)