Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
CURL.SetOptionCAPATH
Sets the certificate directory.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
CURL | 2.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "CURL.SetOptionCAPATH"; curl; Value { ; Encoding } ) More
Parameters
Parameter | Description | Example | Flags |
---|---|---|---|
curl | The CURL session handle. | $curl | |
Value | The path to certificates directory. | "/data/MyCertificates" | |
Encoding | The text encoding for text parameter. Default is UTF-8. Possible encoding names: ANSI, ISO-8859-1, Latin1, Mac, Native, UTF-8, DOS, Hex, Base64 or Windows. More listed in the FAQ. |
"utf8" | Optional |
Result
Returns "OK" on success.
Description
Sets the certificate directory.Pass a string naming a directory holding multiple CA certificates to verify the peer with. The certificate directory must be prepared using the openssl c_rehash utility. This makes sense only when used in combination with the CURL.SetOptionVerifyPeer option. If CURL.SetOptionVerifyPeer is zero, CURL.SetOptionCAPATH need not even indicate an accessible path. The CURL.SetOptionCAPath function apparently does not work in Windows due to some limitation in openssl. This option is OpenSSL-specific and does nothing if libcurl is built to use GnuTLS.
Starting with version 8.0 the plugin will always use UTF-8 encoding for file path on Linux and macOS. For macOS we also do the unicode character normalization for file names for you.
See also CAPATH option in CURL manual.
See also
- CURL.SetOptionCAInfo
- CURL.SetOptionCookie
- CURL.SetOptionCRLF
- CURL.SetOptionDOHSSLVerifyPeer
- CURL.SetOptionPort
- CURL.SetOptionPost
- CURL.SetOptionPut
- CURL.SetOptionSASLIR
- CURL.SetOptionSSLVerifyPeer
Release notes
- Version 8.0
- Changed CURL.SetOptionCAINFO, CURL.SetOptionCAPATH, CURL.SetOptionCookieFile, CURL.SetOptionCookieJar, CURL.SetOptionIssuerCert, CURL.SetOptionNETRCFile, CURL.SetOptionRandomFile, CURL.SetOptionSSHPrivateKeyfile, CURL.SetOptionSSHPublicKeyfile, CURL.SetOptionSSLCert, CURL.SetOptionSSLKey to use always UTF-8 on Mac/Linux and on Mac do the unicode transformation for decomposed characters to avoid trouble with special characters in file paths.
Blog Entries
Created 18th August 2014, last changed 12nd December 2017
