Merge pull request #17237 from RandomShaper/fix-ssl-handshake

Fix HTTPClient SNI support when verify is off
This commit is contained in:
Fabio Alessandrelli 2018-03-15 22:43:34 +01:00 committed by GitHub
commit b0186b41bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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;