This is mostly based on the provisioning example code.
Steps to reproduce
- Build and flash to esp32 with mfi chip
- Start
- Provision device (SSID: mwe-wolfssl-crash)
- Call API (curl -k https://your-ip/test)
- Crash
Crash is likely related with RSA hardware acceleration. Enable the following in components/esp-tls/include/user_settings.h
#define NO_WOLFSSL_ESP32WROOM32_CRYPT_RSA_PRI
And the crash is gone.
$HOMEKIT_PATH/tools/factory_nvs_gen/factory_nvs_gen.py 12345678 70SX hap_12345678_70SX