Text of github.com › curl › curl › issues › 1258 as Styx crawled it on Nov 18, 2026. The page may have changed since. Only its words are kept, without pictures or layout.

Open the live page

Add verbose HTTPS proxy message for fail on CURLE_SSL_CACERT · Issue #1258 · curl/curl · GitHub

Skip to content You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert Add verbose HTTPS proxy message for fail on CURLE_SSL_CACERT #1258 New issue Copy link New issue Copy link Closed Closed Add verbose HTTPS proxy message for fail on CURLE_SSL_CACERT #1258 Copy link Labels TLS cmdline tool connecting & proxies Description jay opened on Feb 11, 2017 Issue body actions I think we should add some message to the tool's verbose text if an HTTPS proxy is in use and CURLE_SSL_CACERT.

For example append a line mentioning --proxy-insecure and --proxy-cacert if the user specified an HTTPS proxy: curl performs SSL certificate verification by default, using a "bundle" of Certificate Authority (CA) public keys (CA certs). If the default bundle file isn't adequate, you can specify an alternate file using the --cacert option. If this HTTPS server uses a certificate signed by a CA represented in the bundle, the certificate verification probably failed due to a problem with the certificate (it might be expired, or the name might not match the domain name in the URL).

If you'd like to turn off curl's verification of the certificate, use the -k (or --insecure) option. HTTPS proxy has similar options --proxy-cacert and --proxy-insecure. and in code: diff --git a/src/tool_operate.c b/src/tool_operate.c index 94ae74d..8f89f04 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -1681,8 +1681,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 */ /cc @rousskov Activity jay added cmdline tool connecting & proxies TLS on Feb 11, 2017 rousskov commented on Feb 11, 2017 rousskov on Feb 11, 2017 Contributor More actions @jay , you should not ask me but IMHO, ideally, curl should detect/relay which certificate (origin or proxy) failed verification and adjust the error message accordingly.

Reaching that ideal is probably difficult, and your change is probably sufficient to help most users. Reacted by Nehal J Wani bagder commented on Feb 11, 2017 bagder on Feb 11, 2017 Member More actions Right, we don't return enough accuracy in the return code for a user to tell if it was a server or proxy that failed the certificate verification - that might be a subject for a separate issue. So until we have that, I'm 👍 on this suggestion. jay closed this as completed in e1187c4 on Feb 11, 2017 lock locked as resolved and limited conversation to collaborators on May 6, 2018 Sign up for free to join this conversation on GitHub.

Already have an account? Sign in to comment Metadata Metadata Assignees No one assigned Labels TLS cmdline tool connecting & proxies Type No type Projects No projects Milestone No milestone Relationships None yet Development No branches or pull requests Issue actions You can’t perform that action at this time.