cacert.d 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. Long: cacert
  2. Arg: <file>
  3. Help: CA certificate to verify peer against
  4. Protocols: TLS
  5. Category: tls
  6. See-also: capath insecure
  7. Example: --cacert CA-file.txt $URL
  8. Added: 7.5
  9. ---
  10. Tells curl to use the specified certificate file to verify the peer. The file
  11. may contain multiple CA certificates. The certificate(s) must be in PEM
  12. format. Normally curl is built to use a default file for this, so this option
  13. is typically used to alter that default file.
  14. curl recognizes the environment variable named 'CURL_CA_BUNDLE' if it is
  15. set, and uses the given path as a path to a CA cert bundle. This option
  16. overrides that variable.
  17. The windows version of curl will automatically look for a CA certs file named
  18. 'curl-ca-bundle.crt', either in the same directory as curl.exe, or in the
  19. Current Working Directory, or in any folder along your PATH.
  20. If curl is built against the NSS SSL library, the NSS PEM PKCS#11 module
  21. (libnsspem.so) needs to be available for this option to work properly.
  22. (iOS and macOS only) If curl is built against Secure Transport, then this
  23. option is supported for backward compatibility with other SSL engines, but it
  24. should not be set. If the option is not set, then curl will use the
  25. certificates in the system and user Keychain to verify the peer, which is the
  26. preferred method of verifying the peer's certificate chain.
  27. (Schannel only) This option is supported for Schannel in Windows 7 or later
  28. with libcurl 7.60 or later. This option is supported for backward
  29. compatibility with other SSL engines; instead it is recommended to use
  30. Windows' store of root certificates (the default for Schannel).
  31. If this option is used several times, the last one will be used.