Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years ago.
Does anybody know how to use mbed-http with a server that has a self signed certificate?
I'm using a NUCLEO-F401RE and trying to use a REST API from a server that uses a self signed certificate. Initially my problem was that's the certificate validation failed, presumably because the CA was not valid. So I changes the call in TLSSocket to disable the authentication, i.e.
mbedtls_ssl_conf_authmode(&_ssl_conf, MBEDTLS_SSL_VERIFY_NONE);
But now I get mbedtls_ssl_handshake() failed: -0x6c00 (-27648): SSL - Internal error (eg, unexpected failure in lower-level module)
Whereas with the previous version, MBEDTLS_SSL_VERIFY_REQUIRED, I got Sent: mbedtls_ssl_handshake() failed: -0x2700 (-9984): X509 - Certificate verification failed, e.g. CRL, CA or signature check failed
The certificate is a SHA256 with RSA encryption, in case this make a difference.
Thanks Mark