This Arduino library for ESP32 provides an easy way to generate self-signed certificates using mbedtls. Certificates can be generated in PEM or DER format, saved on LittleFS, and printed to Serial.
- Copy this folder to your Arduino/libraries directory, ensuring the folder name is ESP32SelfSignedCert.
- Restart Arduino IDE.
- Under
File -> Examples -> ESP32SelfSignedCert
, openSelfSignedCertExample.ino
.
Configure the certificate settings (e.g., common name, organization, country, etc.). Then call generateSelfSignedCertificate()
to generate the certificate and key. See the example for details.