From 8da76f3bb8e7d059d8c9337a441e50809e9358f9 Mon Sep 17 00:00:00 2001 From: Pedro J. Estébanez Date: Sun, 4 Mar 2018 01:22:59 +0100 Subject: 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. (cherry picked from commit 602da6fa4fbc13255e1b0f6c8748ff0035e96325) --- core/io/http_client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/io/http_client.cpp') diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp index a9eb9466b..4d72f744e 100644 --- a/core/io/http_client.cpp +++ b/core/io/http_client.cpp @@ -298,7 +298,7 @@ Error HTTPClient::poll() { case StreamPeerTCP::STATUS_CONNECTED: { if (ssl) { Ref 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) { close(); status = STATUS_SSL_HANDSHAKE_ERROR; -- cgit v1.2.3-70-g09d2