diff options
author | Daniel Stenberg <daniel@haxx.se> | 2017-08-23 09:51:01 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2017-08-23 09:51:01 +0200 |
commit | d82708e30e7baeff3405a88fd44c0b7ddf5b76d7 (patch) | |
tree | 110be26171fcb6d0582871758764b2f38fe54054 | |
parent | 00da16ca5b31be84070fc85a85f28b62204d95a8 (diff) | |
download | curl-bagder/insecure-warning.tar.gz |
curl: warn when --insecure is usedbagder/insecure-warning
-rw-r--r-- | src/tool_operate.c | 5 |
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); |