key.d 1.1 KB

123456789101112131415161718192021222324252627
  1. c: Copyright (C) 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. Multi: single
  12. ---
  13. Private key file name. Allows you to provide your private key in this separate
  14. file. For SSH, if not specified, curl tries the following candidates in order:
  15. '~/.ssh/id_rsa', '~/.ssh/id_dsa', './id_rsa', './id_dsa'.
  16. If curl is built against OpenSSL library, and the engine pkcs11 is available,
  17. then a PKCS#11 URI (RFC 7512) can be used to specify a private key located in
  18. a PKCS#11 device. A string beginning with "pkcs11:" is interpreted as a
  19. PKCS#11 URI. If a PKCS#11 URI is provided, then the --engine option is set as
  20. "pkcs11" if none was provided and the --key-type option is set as "ENG" if
  21. none was provided.
  22. If curl is built against Secure Transport or Schannel then this option is
  23. ignored for TLS protocols (HTTPS, etc). Those backends expect the private key
  24. to be already present in the keychain or PKCS#12 file containing the
  25. certificate.