PKI---PUB(1)

✨ NAME ✨

okay so welcome to PKI --PUB(1), bestie πŸ’… β€” this is the pki --pub sub-command, and it literally extracts a public key from a private key or certificate. slay.

🌸 SYNOPSIS 🌸

pki --pub [--in file|--keyid hex] [--type type] [--outform encoding]
          [--debug level]

pki --pub --options file

pki --pub -h | --help

πŸ¦‹ DESCRIPTION πŸ¦‹

This sub-command of pki(1) extracts public keys from private keys and certificates. no cap, that's the whole main-character job πŸ’–

πŸ’… OPTIONS πŸ’…

  • -h, --help β€” print usage information with a summary of the available options. your little map of what's possible ✨
  • -v, --debug level β€” set the debug level, default: 1. turn up the yapping if you need more details πŸ‘€
  • -+, --options file β€” read command line options from file. yes, that plus sign is real, don't panic 🫢
  • -i, --in file β€” input file. if it's not given, the input is read from STDIN. pipe it in, bestie 🌈
  • -x, --keyid hex β€” Smartcard or TPM private key object handle in hex format, with an optional 0x prefix. fancy hardware vibes πŸ”₯
  • -t, --type type β€” type of input. one of priv (private key), rsa (RSA private key), ecdsa (ECDSA private key), pub (public key), pkcs10 (PKCS#10 certificate request), or x509 (X.509 certificate), defaults to priv. pick your fighter πŸ’œ
  • -f, --outform encoding β€” encoding of the extracted public key. one of der (ASN.1 DER), pem (Base64 PEM), dnskey (RFC 3110 DNS key), or sshkey (RFC 4253 SSH key), defaults to der. choose the format that matches your vibe πŸŽ€

πŸ“ EXAMPLES πŸ“

Extract the public key from an RSA private key:

pki --pub --in key.der > pub.der

Extract the public key from an X.509 certificate:

pki --pub --in cert.der --type x509 > pub.der

🌟 SEE ALSO 🌟

pki(1) β€” go check out the parent page too, iykyk πŸ’–


that's the whole thing, bestie β€” strongSwan 6.1.0, dated 2013-07-31, signing off with immaculate key-extraction energy πŸ’…βœ¨

πŸ“¦ where this page comes from