docs/cmdline: change to .md for cmdline docs
- switch all invidual files documenting command line options into .md,
as the documentation is now markdown-looking.
- made the parser treat 4-space indents as quotes
- switch to building the curl.1 manpage using the "mainpage.idx" file,
which lists the files to include to generate it, instead of using the
previous page-footer/headers. Also, those files are now also .md
ones, using the same format. I gave them underscore prefixes to make
them sort separately:
_NAME.md, _SYNOPSIS.md, _DESCRIPTION.md, _URL.md, _GLOBBING.md,
_VARIABLES.md, _OUTPUT.md, _PROTOCOLS.md, _PROGRESS.md, _VERSION.md,
_OPTIONS.md, _FILES.md, _ENVIRONMENT.md, _PROXYPREFIX.md,
_EXITCODES.md, _BUGS.md, _AUTHORS.md, _WWW.md, _SEEALSO.md
- updated test cases accordingly
Closes #12751
2024-01-21 06:18:43 +08:00
|
|
|
---
|
2023-01-02 20:51:48 +08:00
|
|
|
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
2022-06-14 06:12:03 +08:00
|
|
|
SPDX-License-Identifier: curl
|
2016-11-16 06:44:58 +08:00
|
|
|
Short: E
|
|
|
|
Long: cert
|
|
|
|
Arg: <certificate[:password]>
|
|
|
|
Help: Client certificate file and password
|
|
|
|
Protocols: TLS
|
2020-07-13 20:15:04 +08:00
|
|
|
Category: tls
|
2021-09-28 17:50:07 +08:00
|
|
|
Added: 5.0
|
2022-10-18 16:39:43 +08:00
|
|
|
Multi: single
|
docs/cmdline: change to .md for cmdline docs
- switch all invidual files documenting command line options into .md,
as the documentation is now markdown-looking.
- made the parser treat 4-space indents as quotes
- switch to building the curl.1 manpage using the "mainpage.idx" file,
which lists the files to include to generate it, instead of using the
previous page-footer/headers. Also, those files are now also .md
ones, using the same format. I gave them underscore prefixes to make
them sort separately:
_NAME.md, _SYNOPSIS.md, _DESCRIPTION.md, _URL.md, _GLOBBING.md,
_VARIABLES.md, _OUTPUT.md, _PROTOCOLS.md, _PROGRESS.md, _VERSION.md,
_OPTIONS.md, _FILES.md, _ENVIRONMENT.md, _PROXYPREFIX.md,
_EXITCODES.md, _BUGS.md, _AUTHORS.md, _WWW.md, _SEEALSO.md
- updated test cases accordingly
Closes #12751
2024-01-21 06:18:43 +08:00
|
|
|
See-also:
|
|
|
|
- cert-type
|
|
|
|
- key
|
|
|
|
- key-type
|
|
|
|
Example:
|
|
|
|
- --cert certfile --key keyfile $URL
|
2016-11-16 06:44:58 +08:00
|
|
|
---
|
docs/cmdline: change to .md for cmdline docs
- switch all invidual files documenting command line options into .md,
as the documentation is now markdown-looking.
- made the parser treat 4-space indents as quotes
- switch to building the curl.1 manpage using the "mainpage.idx" file,
which lists the files to include to generate it, instead of using the
previous page-footer/headers. Also, those files are now also .md
ones, using the same format. I gave them underscore prefixes to make
them sort separately:
_NAME.md, _SYNOPSIS.md, _DESCRIPTION.md, _URL.md, _GLOBBING.md,
_VARIABLES.md, _OUTPUT.md, _PROTOCOLS.md, _PROGRESS.md, _VERSION.md,
_OPTIONS.md, _FILES.md, _ENVIRONMENT.md, _PROXYPREFIX.md,
_EXITCODES.md, _BUGS.md, _AUTHORS.md, _WWW.md, _SEEALSO.md
- updated test cases accordingly
Closes #12751
2024-01-21 06:18:43 +08:00
|
|
|
|
|
|
|
# `--cert`
|
|
|
|
|
2016-11-16 06:44:58 +08:00
|
|
|
Tells curl to use the specified client certificate file when getting a file
|
|
|
|
with HTTPS, FTPS or another SSL-based protocol. The certificate must be in
|
|
|
|
PKCS#12 format if using Secure Transport, or PEM format if using any other
|
2023-09-08 20:32:29 +08:00
|
|
|
engine. If the optional password is not specified, it is queried for on
|
2022-08-23 06:18:59 +08:00
|
|
|
the terminal. Note that this option assumes a certificate file that is the
|
|
|
|
private key and the client certificate concatenated. See --cert and --key to
|
2016-11-16 06:44:58 +08:00
|
|
|
specify them independently.
|
|
|
|
|
2024-02-07 01:07:07 +08:00
|
|
|
In the \<certificate\> portion of the argument, you must escape the character
|
|
|
|
`:` as `\:` so that it is not recognized as the password delimiter. Similarly,
|
docs/cmdline: change to .md for cmdline docs
- switch all invidual files documenting command line options into .md,
as the documentation is now markdown-looking.
- made the parser treat 4-space indents as quotes
- switch to building the curl.1 manpage using the "mainpage.idx" file,
which lists the files to include to generate it, instead of using the
previous page-footer/headers. Also, those files are now also .md
ones, using the same format. I gave them underscore prefixes to make
them sort separately:
_NAME.md, _SYNOPSIS.md, _DESCRIPTION.md, _URL.md, _GLOBBING.md,
_VARIABLES.md, _OUTPUT.md, _PROTOCOLS.md, _PROGRESS.md, _VERSION.md,
_OPTIONS.md, _FILES.md, _ENVIRONMENT.md, _PROXYPREFIX.md,
_EXITCODES.md, _BUGS.md, _AUTHORS.md, _WWW.md, _SEEALSO.md
- updated test cases accordingly
Closes #12751
2024-01-21 06:18:43 +08:00
|
|
|
you must escape the double quote character as \" so that it is not recognized
|
|
|
|
as an escape character.
|
2022-08-23 06:18:59 +08:00
|
|
|
|
2018-02-19 21:31:06 +08:00
|
|
|
If curl is built against OpenSSL library, and the engine pkcs11 is available,
|
|
|
|
then a PKCS#11 URI (RFC 7512) can be used to specify a certificate located in
|
2024-02-07 01:07:07 +08:00
|
|
|
a PKCS#11 device. A string beginning with `pkcs11:` is interpreted as a
|
2023-09-08 20:32:29 +08:00
|
|
|
PKCS#11 URI. If a PKCS#11 URI is provided, then the --engine option is set as
|
2024-02-07 01:07:07 +08:00
|
|
|
`pkcs11` if none was provided and the --cert-type option is set as `ENG` if
|
2023-09-08 20:32:29 +08:00
|
|
|
none was provided.
|
2018-02-19 21:31:06 +08:00
|
|
|
|
2016-11-16 06:44:58 +08:00
|
|
|
(iOS and macOS only) If curl is built against Secure Transport, then the
|
|
|
|
certificate string can either be the name of a certificate/private key in the
|
|
|
|
system or user keychain, or the path to a PKCS#12-encoded certificate and
|
|
|
|
private key. If you want to use a file from the current directory, please
|
2024-02-07 01:07:07 +08:00
|
|
|
precede it with `./` prefix, in order to avoid confusion with a nickname.
|
2016-11-16 06:44:58 +08:00
|
|
|
|
docs/cmdline: change to .md for cmdline docs
- switch all invidual files documenting command line options into .md,
as the documentation is now markdown-looking.
- made the parser treat 4-space indents as quotes
- switch to building the curl.1 manpage using the "mainpage.idx" file,
which lists the files to include to generate it, instead of using the
previous page-footer/headers. Also, those files are now also .md
ones, using the same format. I gave them underscore prefixes to make
them sort separately:
_NAME.md, _SYNOPSIS.md, _DESCRIPTION.md, _URL.md, _GLOBBING.md,
_VARIABLES.md, _OUTPUT.md, _PROTOCOLS.md, _PROGRESS.md, _VERSION.md,
_OPTIONS.md, _FILES.md, _ENVIRONMENT.md, _PROXYPREFIX.md,
_EXITCODES.md, _BUGS.md, _AUTHORS.md, _WWW.md, _SEEALSO.md
- updated test cases accordingly
Closes #12751
2024-01-21 06:18:43 +08:00
|
|
|
(Schannel only) Client certificates must be specified by a path expression to
|
|
|
|
a certificate store. (Loading *PFX* is not supported; you can import it to a
|
2024-02-07 01:07:07 +08:00
|
|
|
store first). You can use "\<store location\>\\<store name\>\\<thumbprint\>"
|
|
|
|
to refer to a certificate in the system certificates store, for example,
|
docs/cmdline: change to .md for cmdline docs
- switch all invidual files documenting command line options into .md,
as the documentation is now markdown-looking.
- made the parser treat 4-space indents as quotes
- switch to building the curl.1 manpage using the "mainpage.idx" file,
which lists the files to include to generate it, instead of using the
previous page-footer/headers. Also, those files are now also .md
ones, using the same format. I gave them underscore prefixes to make
them sort separately:
_NAME.md, _SYNOPSIS.md, _DESCRIPTION.md, _URL.md, _GLOBBING.md,
_VARIABLES.md, _OUTPUT.md, _PROTOCOLS.md, _PROGRESS.md, _VERSION.md,
_OPTIONS.md, _FILES.md, _ENVIRONMENT.md, _PROXYPREFIX.md,
_EXITCODES.md, _BUGS.md, _AUTHORS.md, _WWW.md, _SEEALSO.md
- updated test cases accordingly
Closes #12751
2024-01-21 06:18:43 +08:00
|
|
|
*"CurrentUser\MY\934a7ac6f8a5d579285a74fa61e19f23ddfe8d7a"*. Thumbprint is
|
2018-04-18 21:01:14 +08:00
|
|
|
usually a SHA-1 hex string which you can see in certificate details. Following
|
docs/cmdline: change to .md for cmdline docs
- switch all invidual files documenting command line options into .md,
as the documentation is now markdown-looking.
- made the parser treat 4-space indents as quotes
- switch to building the curl.1 manpage using the "mainpage.idx" file,
which lists the files to include to generate it, instead of using the
previous page-footer/headers. Also, those files are now also .md
ones, using the same format. I gave them underscore prefixes to make
them sort separately:
_NAME.md, _SYNOPSIS.md, _DESCRIPTION.md, _URL.md, _GLOBBING.md,
_VARIABLES.md, _OUTPUT.md, _PROTOCOLS.md, _PROGRESS.md, _VERSION.md,
_OPTIONS.md, _FILES.md, _ENVIRONMENT.md, _PROXYPREFIX.md,
_EXITCODES.md, _BUGS.md, _AUTHORS.md, _WWW.md, _SEEALSO.md
- updated test cases accordingly
Closes #12751
2024-01-21 06:18:43 +08:00
|
|
|
store locations are supported: *CurrentUser*, *LocalMachine*,
|
|
|
|
*CurrentService*, *Services*, *CurrentUserGroupPolicy*,
|
|
|
|
*LocalMachineGroupPolicy* and *LocalMachineEnterprise*.
|