aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJay Satiro <raysatiro@yahoo.com>2017-02-21 22:21:17 -0500
committerJay Satiro <raysatiro@yahoo.com>2017-02-21 22:24:40 -0500
commitb259646ea10fc13d6cd97608824d0038f9720996 (patch)
tree8b69c53b5c396dc7b605bf87211e759d348b6a50 /lib
parent0e8d3e838eafa75fe1373db757a2940cb33a2ba8 (diff)
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')
-rw-r--r--lib/url.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/url.c b/lib/url.c
index b8f7cfb9b..a78a2412f 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -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.