1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-04 18:03:20 +03:00

Note that CERTS.IDX file is generated on-chip (#4902)

Several users have been worried that they need to generate the IDX file,
but don't know how.  The CertStore code actually writes this file on object
creation, and the user never needs to explicitly generate or upload it.

Add a comment to the example explicitly noting this.
This commit is contained in:
Earle F. Philhower, III 2018-07-08 21:54:40 -07:00 committed by GitHub
parent 945535ae78
commit 89d2f42153
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,8 +2,11 @@
//
// Before running, you must download the set of certs using
// the script "certs-from-mozilla.py" (no parameters)
// and then uploading the generated data directory to
// SPIFFS.
// and then uploading the generated .AR file to SPIFFS or SD.
//
// You do not need to generate the ".IDX" file listed below,
// it is generated automatically when the CertStore object
// is created and written to SD or SPIFFS by the ESP8266.
//
// Why would you need a CertStore?
//
@ -19,7 +22,7 @@
// 10s or 100s of CAs against which you can check the
// target's X.509, without taking any more RAM than a single
// certificate. This is the same way that standard browsers
// and operating systems use to verify SSL connections.
// and operating systems verify SSL connections.
//
// About the chosen certs:
// The certificates are scraped from the Mozilla.org current
@ -82,8 +85,8 @@ class SDCertStoreFile : public BearSSL::CertStoreFile {
const char *_name;
};
SDCertStoreFile certs_idx("/certs.idx");
SDCertStoreFile certs_ar("/certs.ar");
SDCertStoreFile certs_idx("/certs.idx"); // Generated by the ESP8266
SDCertStoreFile certs_ar("/certs.ar"); // Uploaded by the user
#else
@ -118,8 +121,9 @@ class SPIFFSCertStoreFile : public BearSSL::CertStoreFile {
const char *_name;
};
SPIFFSCertStoreFile certs_idx("/certs.idx");
SPIFFSCertStoreFile certs_ar("/certs.ar");
SPIFFSCertStoreFile certs_idx("/certs.idx"); // Generated by the ESP8266
SPIFFSCertStoreFile certs_ar("/certs.ar"); // Uploaded by the user
#endif
// Set time via NTP, as required for x.509 validation