Skip to content

Commit

Permalink
tool_operate: Show HTTPS-Proxy options on CURLE_SSL_CACERT
Browse files Browse the repository at this point in the history
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 #1258
  • Loading branch information
jay committed Feb 11, 2017
1 parent 8721f3a commit e1187c4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/tool_operate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit e1187c4

Please sign in to comment.