diff --git a/esp32_device/main/main.c b/esp32_device/main/main.c index 9e7996e..0fc3759 100755 --- a/esp32_device/main/main.c +++ b/esp32_device/main/main.c @@ -145,7 +145,7 @@ void app_main(void) // Retrieve device certificate if missing ESP_LOGI(TAG, "Check device certificate"); - if (storage_get_dev_cert(NULL) == 0) + if (storage_get_dev_cert(NULL) < 2) { char *dev_cert = secure_api_get_dev_certificate(); if (!dev_cert)