key.d 1.2 KB

12345678910111213141516171819202122232425262728
  1. c: Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
  2. SPDX-License-Identifier: curl
  3. Long: key
  4. Arg: <key>
  5. Protocols: TLS SSH
  6. Help: Private key file name
  7. Category: tls ssh
  8. Example: --cert certificate --key here $URL
  9. Added: 7.9.3
  10. See-also: key-type cert
  11. ---
  12. Private key file name. Allows you to provide your private key in this separate
  13. file. For SSH, if not specified, curl tries the following candidates in order:
  14. \&'~/.ssh/id_rsa', '~/.ssh/id_dsa', './id_rsa', './id_dsa'.
  15. If curl is built against OpenSSL library, and the engine pkcs11 is available,
  16. then a PKCS#11 URI (RFC 7512) can be used to specify a private key located in a
  17. PKCS#11 device. A string beginning with "pkcs11:" will be interpreted as a
  18. PKCS#11 URI. If a PKCS#11 URI is provided, then the --engine option will be set
  19. as "pkcs11" if none was provided and the --key-type option will be set as
  20. "ENG" if none was provided.
  21. If curl is built against Secure Transport or Schannel then this option is
  22. ignored for TLS protocols (HTTPS, etc). Those backends expect the private key
  23. to be already present in the keychain or PKCS#12 file containing the
  24. certificate.
  25. If this option is used several times, the last one will be used.