cacert.d 1.7 KB

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