mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-07 16:23:38 +03:00
Compile failure fix with FS_NO_GLOBALS flag (#7685)
This commit is contained in:
parent
77bd71ec29
commit
996211f132
@ -80,7 +80,7 @@ CertStore::CertInfo CertStore::_preprocessCert(uint32_t length, uint32_t offset,
|
|||||||
|
|
||||||
// The certs.ar file is a UNIX ar format file, concatenating all the
|
// The certs.ar file is a UNIX ar format file, concatenating all the
|
||||||
// individual certificates into a single blob in a space-efficient way.
|
// individual certificates into a single blob in a space-efficient way.
|
||||||
int CertStore::initCertStore(FS &fs, const char *indexFileName, const char *dataFileName) {
|
int CertStore::initCertStore(fs::FS &fs, const char *indexFileName, const char *dataFileName) {
|
||||||
int count = 0;
|
int count = 0;
|
||||||
uint32_t offset = 0;
|
uint32_t offset = 0;
|
||||||
|
|
||||||
@ -101,12 +101,12 @@ int CertStore::initCertStore(FS &fs, const char *indexFileName, const char *data
|
|||||||
memcpy_P(_indexName, indexFileName, strlen_P(indexFileName) + 1);
|
memcpy_P(_indexName, indexFileName, strlen_P(indexFileName) + 1);
|
||||||
memcpy_P(_dataName, dataFileName, strlen_P(dataFileName) + 1);
|
memcpy_P(_dataName, dataFileName, strlen_P(dataFileName) + 1);
|
||||||
|
|
||||||
File index = _fs->open(_indexName, "w");
|
fs::File index = _fs->open(_indexName, "w");
|
||||||
if (!index) {
|
if (!index) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
File data = _fs->open(_dataName, "r");
|
fs::File data = _fs->open(_dataName, "r");
|
||||||
if (!data) {
|
if (!data) {
|
||||||
index.close();
|
index.close();
|
||||||
return 0;
|
return 0;
|
||||||
@ -179,7 +179,7 @@ const br_x509_trust_anchor *CertStore::findHashedTA(void *ctx, void *hashed_dn,
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
File index = cs->_fs->open(cs->_indexName, "r");
|
fs::File index = cs->_fs->open(cs->_indexName, "r");
|
||||||
if (!index) {
|
if (!index) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
@ -191,12 +191,12 @@ const br_x509_trust_anchor *CertStore::findHashedTA(void *ctx, void *hashed_dn,
|
|||||||
if (!der) {
|
if (!der) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
File data = cs->_fs->open(cs->_dataName, "r");
|
fs::File data = cs->_fs->open(cs->_dataName, "r");
|
||||||
if (!data) {
|
if (!data) {
|
||||||
free(der);
|
free(der);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
if (!data.seek(ci.offset, SeekSet)) {
|
if (!data.seek(ci.offset, fs::SeekSet)) {
|
||||||
data.close();
|
data.close();
|
||||||
free(der);
|
free(der);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user