Skip to content

Commit cdf70e5

Browse files
author
Federico Fissore
committed
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
1 parent de1e65f commit cdf70e5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libraries/Bridge/src/HttpClient.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,28 @@
2020

2121
unsigned int HttpClient::get(String &url) {
2222
begin("curl");
23+
addParameter("-k");
2324
addParameter(url);
2425
return run();
2526
}
2627

2728
unsigned int HttpClient::get(const char *url) {
2829
begin("curl");
30+
addParameter("-k");
2931
addParameter(url);
3032
return run();
3133
}
3234

3335
void HttpClient::getAsynchronously(String &url) {
3436
begin("curl");
37+
addParameter("-k");
3538
addParameter(url);
3639
runAsynchronously();
3740
}
3841

3942
void HttpClient::getAsynchronously(const char *url) {
4043
begin("curl");
44+
addParameter("-k");
4145
addParameter(url);
4246
runAsynchronously();
4347
}

0 commit comments

Comments
 (0)