This is a little example PIO project for the ESP8266, allowing it to securely connect to the Adafruit IO MQTT servers over MQTTS, however instead of using a certificate fingerprint which is prone to expiring (often within a few months) it uses a certificate store
The code is a combination of the BearSSL certStore example and the Adafruit secure esp8266 example
It's made to work with platformIO.
The python script will have to be modified if used with Arduino (path to ar.exe needs to be updated)
To use this you need:
- platformio with the esp8266 platform installed
- openssl installed and on the path
- run the
get_moz_certs.py
script. It should get a bunch of.der
files and put them intodata/
and then combine them in a single binary - run the uploadfs target
pio run --target uploadfs
or use the "Upload Filesystem Image" option underPROJECT TASKS -> env:d1_mini -> Platform -> Upload Filesystem Image
- upload the example (after filling in your secrets in secrets.hpp)
pio run -target upload