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
This commit is contained in:
Federico Fissore 2014-05-21 09:47:49 +02:00
parent de1e65f716
commit cdf70e501d
1 changed files with 4 additions and 0 deletions

View File

@ -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();
}