mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-30 19:52:13 +01:00
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:
parent
de1e65f716
commit
cdf70e501d
@ -20,24 +20,28 @@
|
|||||||
|
|
||||||
unsigned int HttpClient::get(String &url) {
|
unsigned int HttpClient::get(String &url) {
|
||||||
begin("curl");
|
begin("curl");
|
||||||
|
addParameter("-k");
|
||||||
addParameter(url);
|
addParameter(url);
|
||||||
return run();
|
return run();
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int HttpClient::get(const char *url) {
|
unsigned int HttpClient::get(const char *url) {
|
||||||
begin("curl");
|
begin("curl");
|
||||||
|
addParameter("-k");
|
||||||
addParameter(url);
|
addParameter(url);
|
||||||
return run();
|
return run();
|
||||||
}
|
}
|
||||||
|
|
||||||
void HttpClient::getAsynchronously(String &url) {
|
void HttpClient::getAsynchronously(String &url) {
|
||||||
begin("curl");
|
begin("curl");
|
||||||
|
addParameter("-k");
|
||||||
addParameter(url);
|
addParameter(url);
|
||||||
runAsynchronously();
|
runAsynchronously();
|
||||||
}
|
}
|
||||||
|
|
||||||
void HttpClient::getAsynchronously(const char *url) {
|
void HttpClient::getAsynchronously(const char *url) {
|
||||||
begin("curl");
|
begin("curl");
|
||||||
|
addParameter("-k");
|
||||||
addParameter(url);
|
addParameter(url);
|
||||||
runAsynchronously();
|
runAsynchronously();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user