Ota-http-client with client certificate (+key)

  1. My goal is: perform OTA update via HTTPS with a client certificate
  2. My actions are: I tried calling mgos_ota_http_start(URL, &opts), and setting “update.ssl_ca_file” and “update.ssl_client_cert_file”, but I don’t see an option for “update.ssl_client_key_file”
  3. The result I see is: mgos_ota_http_clien:102 Failed to connect (My S3 bucket has HAProxy which requires a client certificate)
  4. My expectation & question is: instructions on how to use mgos_ota_http_start() with a client certificate.

I guess the ssl_client_cert_file should be a PEM with combined cert + key - please try it.

Combining the certificate with the private key in one PEM file works.

Tested and working for ota-http-client() and mg_connect_ws_opt()

1 Like