blob: 0cd5d535f007699bb7a7dd9fc1d21b4dc21e14c2 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001Short: E
2Long: cert
3Arg: <certificate[:password]>
4Help: Client certificate file and password
5Protocols: TLS
6See-also: cert-type key key-type
7---
8Tells curl to use the specified client certificate file when getting a file
9with HTTPS, FTPS or another SSL-based protocol. The certificate must be in
10PKCS#12 format if using Secure Transport, or PEM format if using any other
11engine. If the optional password isn't specified, it will be queried for on
12the terminal. Note that this option assumes a \&"certificate" file that is the
13private key and the client certificate concatenated! See --cert and --key to
14specify them independently.
15
16If curl is built against the NSS SSL library then this option can tell
17curl the nickname of the certificate to use within the NSS database defined
18by the environment variable SSL_DIR (or by default /etc/pki/nssdb). If the
19NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files may be
20loaded. If you want to use a file from the current directory, please precede
21it with "./" prefix, in order to avoid confusion with a nickname. If the
22nickname contains ":", it needs to be preceded by "\\" so that it is not
23recognized as password delimiter. If the nickname contains "\\", it needs to
24be escaped as "\\\\" so that it is not recognized as an escape character.
25
26(iOS and macOS only) If curl is built against Secure Transport, then the
27certificate string can either be the name of a certificate/private key in the
28system or user keychain, or the path to a PKCS#12-encoded certificate and
29private key. If you want to use a file from the current directory, please
30precede it with "./" prefix, in order to avoid confusion with a nickname.
31
32If this option is used several times, the last one will be used.