aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Satiro <raysatiro@yahoo.com>2017-02-11 16:35:47 -0500
committerJay Satiro <raysatiro@yahoo.com>2017-02-11 16:35:47 -0500
commite1187c42a4b58f16343d2da653be00c36d930e16 (patch)
treeebc63ff20800bdcb9571b41e3bf7cb41ebb8d989
parent8721f3a50e016a34f4ccb45fecfdd1a658f15ac3 (diff)
tool_operate: Show HTTPS-Proxy options on CURLE_SSL_CACERT
When CURLE_SSL_CACERT occurs the tool shows a lengthy error message to the user explaining possible solutions such as --cacert and --insecure. This change appends to that message similar options --proxy-cacert and --proxy-insecure when there's a specified HTTPS proxy. Closes https://github.com/curl/curl/issues/1258
-rw-r--r--src/tool_operate.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c
index db53d0d5a..ef4f74a2b 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -1678,8 +1678,13 @@ static CURLcode operate_do(struct GlobalConfig *global,
fprintf(global->errors, "curl: (%d) %s\n", result, (errorbuffer[0]) ?
errorbuffer : curl_easy_strerror(result));
if(result == CURLE_SSL_CACERT)
- fprintf(global->errors, "%s%s",
- CURL_CA_CERT_ERRORMSG1, CURL_CA_CERT_ERRORMSG2);
+ fprintf(global->errors, "%s%s%s",
+ CURL_CA_CERT_ERRORMSG1, CURL_CA_CERT_ERRORMSG2,
+ ((config->proxy &&
+ curl_strnequal(config->proxy, "https://", 8)) ?
+ "HTTPS proxy has similar options --proxy-cacert "
+ "and --proxy-insecure.\n" :
+ ""));
}
/* Fall through comment to 'quit_urls' label */