From 367ca9cf4fb92969139fe27b54fcd83d132f58db Mon Sep 17 00:00:00 2001 From: pennam Date: Tue, 14 Feb 2023 14:50:43 +0100 Subject: [PATCH 1/2] HttpsRequest: Remove trailing slash from ca cert path --- libraries/SocketWrapper/src/utility/https_request.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/SocketWrapper/src/utility/https_request.h b/libraries/SocketWrapper/src/utility/https_request.h index 9e3b868cf..4b70415be 100644 --- a/libraries/SocketWrapper/src/utility/https_request.h +++ b/libraries/SocketWrapper/src/utility/https_request.h @@ -64,7 +64,7 @@ class HttpsRequest : public HttpRequestBase { 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; } From 0fb960e3431b8af3bfe330e4b5e78ca475a42577 Mon Sep 17 00:00:00 2001 From: pennam Date: Tue, 14 Feb 2023 14:51:53 +0100 Subject: [PATCH 2/2] HttpsRequest: Set socket hostname from parsed url --- libraries/SocketWrapper/src/utility/https_request.h | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/SocketWrapper/src/utility/https_request.h b/libraries/SocketWrapper/src/utility/https_request.h index 4b70415be..fdb694184 100644 --- a/libraries/SocketWrapper/src/utility/https_request.h +++ b/libraries/SocketWrapper/src/utility/https_request.h @@ -61,6 +61,7 @@ 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