esp_https_ota.rst 940 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. ESP HTTPS OTA
  2. =============
  3. Overview
  4. --------
  5. ``esp_https_ota`` provides simplified APIs to perform firmware upgrades over HTTPS.
  6. It's an abstraction layer over existing OTA APIs.
  7. Application Example
  8. -------------------
  9. .. highlight:: c
  10. ::
  11. esp_err_t do_firmware_upgrade()
  12. {
  13. esp_http_client_config_t config = {
  14. .url = CONFIG_FIRMWARE_UPGRADE_URL,
  15. .cert_pem = (char *)server_cert_pem_start,
  16. };
  17. esp_err_t ret = esp_https_ota(&config);
  18. if (ret == ESP_OK) {
  19. esp_restart();
  20. } else {
  21. return ESP_FAIL;
  22. }
  23. return ESP_OK;
  24. }
  25. Signature Verification
  26. ----------------------
  27. For additional security, signature of OTA firmware images can be verified. For that, refer :ref:`secure-ota-updates`
  28. API Reference
  29. -------------
  30. .. include-build-file:: inc/esp_https_ota.inc