From cdf70e501db562eb80a99b4c1dc3c51b8bb3143a Mon Sep 17 00:00:00 2001 From: Federico Fissore Date: Wed, 21 May 2014 09:47:49 +0200 Subject: [PATCH] Adds parameter "-k" to every way of calling curl, hence allowing calling https URLs without checking for the validity of SSL certificates. While this makes it a little insecure, nothing else can be done while keeping the HTTPClient API simple: openwrt does not have a SSL certificates bundle Advanced users concerned about security should call "curl" on their own using Process, supplying parameters such as "--cacert" Fixes #1860 --- libraries/Bridge/src/HttpClient.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/Bridge/src/HttpClient.cpp b/libraries/Bridge/src/HttpClient.cpp index 68d23718e..dcbcec942 100644 --- a/libraries/Bridge/src/HttpClient.cpp +++ b/libraries/Bridge/src/HttpClient.cpp @@ -20,24 +20,28 @@ unsigned int HttpClient::get(String &url) { begin("curl"); + addParameter("-k"); addParameter(url); return run(); } unsigned int HttpClient::get(const char *url) { begin("curl"); + addParameter("-k"); addParameter(url); return run(); } void HttpClient::getAsynchronously(String &url) { begin("curl"); + addParameter("-k"); addParameter(url); runAsynchronously(); } void HttpClient::getAsynchronously(const char *url) { begin("curl"); + addParameter("-k"); addParameter(url); runAsynchronously(); }