summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-08-23 09:51:01 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-08-23 09:51:01 +0200
commitd82708e30e7baeff3405a88fd44c0b7ddf5b76d7 (patch)
tree110be26171fcb6d0582871758764b2f38fe54054
parent00da16ca5b31be84070fc85a85f28b62204d95a8 (diff)
downloadcurl-bagder/insecure-warning.tar.gz
curl: warn when --insecure is usedbagder/insecure-warning
-rw-r--r--src/tool_operate.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c
index fd9a13921..1b695795c 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -1145,6 +1145,8 @@ static CURLcode operate_do(struct GlobalConfig *global,
if(config->insecure_ok) {
my_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
my_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+ warnf(config->global,
+ "Your SSL connection is INSECURE (due to --insecure)\n");
}
else {
my_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1L);
@@ -1154,6 +1156,9 @@ static CURLcode operate_do(struct GlobalConfig *global,
if(config->proxy_insecure_ok) {
my_setopt(curl, CURLOPT_PROXY_SSL_VERIFYPEER, 0L);
my_setopt(curl, CURLOPT_PROXY_SSL_VERIFYHOST, 0L);
+ warnf(config->global,
+ "Your proxy SSL connection is now INSECURE "
+ "(due to --proxy-insecure)\n");
}
else {
my_setopt(curl, CURLOPT_PROXY_SSL_VERIFYPEER, 1L);