Project

General

Profile

ipsec pki --pub

Synopsis

pki --pub [--in file|--keyid hex] [--type rsa|ecdsa|bliss|priv|pub|pkcs10|x509]
          [--outform der|pem|dnskey|sshkey]

           --help     (-h)  show usage information
           --in       (-i)  input file, default: stdin
           --keyid    (-x)  smartcard or TPM private key object handle
           --type     (-t)  type of credential, default: priv
           --outform  (-f)  encoding of extracted public key, default: der
           --debug    (-v)  set debug level, default: 1
           --options  (-+)  read command line options from file

Description

Extract the public key from a private key, PKCS#10 certificate request or X.509 certificate

Examples

  • Extract the public key from an RSA private key
pki --pub --in myKey.der > myPub.der
  • Extract the public key from an ECDSA private key
pki --pub --in myKey.der --type ecdsa  > myPub.der
  • Extract the public key from a BLISS private key
pki --pub --in myKey.der --type bliss  > myPub.der
  • Extract the public key from a PKCS#10 certificate request
pki --pub --in myReq.der --type pkcs10  > myPub.der
  • Extract the public key from an X.509 certificate
pki --pub --in myCert.der --type x509  > myPub.der