diff --git a/libraries/SocketWrapper/src/utility/https_request.h b/libraries/SocketWrapper/src/utility/https_request.h index 9e3b868cf..fdb694184 100644 --- a/libraries/SocketWrapper/src/utility/https_request.h +++ b/libraries/SocketWrapper/src/utility/https_request.h @@ -61,10 +61,11 @@ class HttpsRequest : public HttpRequestBase { _socket = new TLSSocket(); ((TLSSocket*)_socket)->open(network); + ((TLSSocket*)_socket)->set_hostname(_parsed_url->host()); if (ssl_ca_pem) ((TLSSocket*)_socket)->set_root_ca_cert(ssl_ca_pem); else - ((TLSSocket*)_socket)->set_root_ca_cert_path("/wlan/"); + ((TLSSocket*)_socket)->set_root_ca_cert_path("/wlan"); _we_created_socket = true; }