diff options
author | Jay Satiro <raysatiro@yahoo.com> | 2017-02-21 22:21:17 -0500 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2017-02-21 22:24:40 -0500 |
commit | b259646ea10fc13d6cd97608824d0038f9720996 (patch) | |
tree | 8b69c53b5c396dc7b605bf87211e759d348b6a50 /lib/url.c | |
parent | 0e8d3e838eafa75fe1373db757a2940cb33a2ba8 (diff) | |
download | curl-b259646ea10fc13d6cd97608824d0038f9720996.tar.gz |
url: Improve CURLOPT_PROXY_CAPATH error handling
- Change CURLOPT_PROXY_CAPATH to return CURLE_NOT_BUILT_IN if the option
is not supported, which is the same as what we already do for
CURLOPT_CAPATH.
- Change the curl tool to handle CURLOPT_PROXY_CAPATH error
CURLE_NOT_BUILT_IN as a warning instead of as an error, which is the
same as what we already do for CURLOPT_CAPATH.
- Fix CAPATH docs to show that CURLE_NOT_BUILT_IN is returned when the
respective CAPATH option is not supported by the SSL library.
Ref: https://github.com/curl/curl/pull/1257
Diffstat (limited to 'lib/url.c')
-rw-r--r-- | lib/url.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -583,8 +583,9 @@ CURLcode Curl_init_userdefined(struct UserDefined *set) if(result) return result; - result = setstropt(&set->str[STRING_SSL_CAPATH_PROXY], - (char *) CURL_CA_PATH); + result = setstropt(&set->str[STRING_SSL_CAPATH_PROXY], CURL_CA_PATH); + if(result) + return result; #endif set->wildcardmatch = FALSE; @@ -2225,8 +2226,12 @@ CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option, /* This does not work on windows. */ result = setstropt(&data->set.str[STRING_SSL_CAPATH_ORIG], va_arg(param, char *)); +#else + result = CURLE_NOT_BUILT_IN; +#endif break; case CURLOPT_PROXY_CAPATH: +#ifdef have_curlssl_ca_path /* not supported by all backends */ /* * Set CA path info for SSL connection proxy. Specify directory name of the * CA certificates which have been prepared using openssl c_rehash utility. |