1 .TH "PKI \-\-PUB" 1 "2013-07-31" "@PACKAGE_VERSION@" "strongSwan"
5 pki \-\-pub \- Extract a public key from a private key or certificate
11 .IR file | \fB\-\-keyid\fR
14 .OP \-\-outform encoding
19 .BI \-\-options\~ file
32 extracts public keys from a private keys and certificates.
38 Print usage information with a summary of the available options.
40 .BI "\-v, \-\-debug " level
41 Set debug level, default: 1.
43 .BI "\-+, \-\-options " file
44 Read command line options from \fIfile\fR.
46 .BI "\-i, \-\-in " file
47 Input file. If not given the input is read from \fISTDIN\fR.
49 .BI "\-x, \-\-keyid " hex
50 Smartcard or TPM private key object handle in hex format with an optional
53 .BI "\-t, \-\-type " type
54 Type of input. One of \fIpriv\fR (private key), \fIrsa\fR (RSA private key),
55 \fIecdsa\fR (ECDSA private key), \fIpub\fR (public key), \fIpkcs10\fR (PKCS#10
56 certificate request), or \fIx509\fR (X.509 certificate), defaults to \fIpriv\fR.
58 .BI "\-f, \-\-outform " encoding
59 Encoding of the extracted public key. One of \fIder\fR (ASN.1 DER), \fIpem\fR
60 (Base64 PEM), \fIdnskey\fR (RFC 3110 DNS key), or \fIsshkey\fR (RFC 4253 SSH
61 key), defaults to \fIder\fR.
65 Extract the public key from an RSA private key:
68 pki --pub --in key.der > pub.der
71 Extract the public key from an X.509 certificate:
74 pki --pub --in cert.der --type x509 > pub.der