Fix wrong SSL handshake

The name of the remote host is passed to mbed TLS in all cases so the client hello message is correctly formed.
This commit is contained in:
Pedro J. Estébanez 2018-03-04 01:22:59 +01:00
parent cf0bc13588
commit 602da6fa4f
1 changed files with 1 additions and 1 deletions

View File

@ -298,7 +298,7 @@ Error HTTPClient::poll() {
case StreamPeerTCP::STATUS_CONNECTED: { case StreamPeerTCP::STATUS_CONNECTED: {
if (ssl) { if (ssl) {
Ref<StreamPeerSSL> ssl = StreamPeerSSL::create(); Ref<StreamPeerSSL> ssl = StreamPeerSSL::create();
Error err = ssl->connect_to_stream(tcp_connection, ssl_verify_host, ssl_verify_host ? conn_host : String()); Error err = ssl->connect_to_stream(tcp_connection, ssl_verify_host, conn_host);
if (err != OK) { if (err != OK) {
close(); close();
status = STATUS_SSL_HANDSHAKE_ERROR; status = STATUS_SSL_HANDSHAKE_ERROR;