CURLOPT_CAPATH: return failure if set without backend support

This commit is contained in:
Daniel Stenberg
2014-09-13 14:56:27 +02:00
parent 7d9bef9286
commit 8250f93d41
3 changed files with 11 additions and 0 deletions

View File

@@ -1991,6 +1991,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
va_arg(param, char *));
break;
case CURLOPT_CAPATH:
#ifdef have_ca_path /* not supported by all backends */
/*
* Set CA path info for SSL connection. Specify directory name of the CA
* certificates which have been prepared using openssl c_rehash utility.
@@ -1998,6 +1999,9 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
/* This does not work on windows. */
result = setstropt(&data->set.str[STRING_SSL_CAPATH],
va_arg(param, char *));
#else
result = CURLE_NOT_BUILT_IN;
#endif
break;
case CURLOPT_CRLFILE:
/*