Hi,
I would like to use the HTTP Client Library to connect to a specific server securely using TLS.
The specific server can connect without security. The connection and HTTP POST request had been tested successfully
and then had gotten correct json response using HTTP client library.
But there is a problem to connect to the specific server using TLS.
The specific server has no CA application temporarily and don't verify peer certificate. The client side has to disable validation of server certificate.
So I set 'sparams.cafile[0] = 0;' to disable server verification, and set SecureMask as SL_SEC_MASK_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA which is supported by both sides.
As described on programmer's guide, Root CA – This is the root certificate authority that issued the server certificate and is used to validate that the server is authentic. This file is not mandatory. If the server is not verified, the connection occurs, but the connect command returns an error, SL_ESECSNOVERIFY. This error can be ignored as it is only a warning for an unauthenticated connection.
I ignored error SL_ESECSNOVERIFY and then did HTTP POST request. But it returned error -9 (Bad file number) when read HTTP POST request status code.
It received [SOCK ERROR] - TX FAILED : socket 247 , reason(-9).
Regards,
Luke