CURLOPT_CAPATH man page
CURLOPT_CAPATH — specify directory holding CA certificates
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CAPATH, char *capath);
Pass a char * to a zero terminated string naming a directory holding multiple CA certificates to verify the peer with. If libcurl is built against OpenSSL, the certificate directory must be prepared using the openssl c_rehash utility. This makes sense only when used in combination with the CURLOPT_SSL_VERIFYPEER(3) option.
The CURLOPT_CAPATH(3) function apparently does not work in Windows due to some limitation in openssl.
The application does not have to keep the string around after setting this option.
All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
This option is supported by the OpenSSL, GnuTLS and PolarSSL backends. The NSS backend provides the option only for backward compatibility.
CURLE_OK if supported; or an error such as:
CURLE_NOT_BUILT_IN - Not supported by the SSL backend
CURLOPT_CAINFO(3), CURLOPT_STDERR(3), CURLOPT_DEBUGFUNCTION(3),
curl_easy_setopt(3), CURLOPT_CAINFO(3), CURLOPT_PINNEDPUBLICKEY(3), CURLOPT_PROXY_CAINFO(3), CURLOPT_SSL_VERIFYPEER(3).