ESP-TLS: perform HTTPS POST request without certificate

Posts: 195
Joined: Thu Nov 17, 2016 2:33 pm

ESP-TLS: perform HTTPS POST request without certificate

Postby davdav » Wed May 13, 2020 3:17 pm

Hi everybody,

My scope is to perform HTTPS POST via ESP-TLS without certificate. ESP32 acts as a client and it has to post some data to server.
However, the server address and URL is configured by the final customer, so it is not always the same.

I would like to understand if it is possible to do this operation without having a certificate.

I started using "https_request" example and commenting the certificate cfg (i.e. no embedded .pem file). I did a couple of tests with 2 servers. In one case it works, the other reported error:

Code: Select all

E (13884) esp-tls: mbedtls_ssl_handshake returned -0x7780 >> (#define MBEDTLS_ERR_SSL_FATAL_ALERT_MESSAGE -0x7780  /**< A fatal alert message was received from our peer. */)
E (13894) esp-tls: Failed to open new connection
I do not understand if it is mandatory to have a certificate to post data via HTTPS or not.
If it is mandatory, should the customer be able to load in ESP32 a certificate?


Who is online

Users browsing this forum: No registered users and 27 guests