pki: Add pki --pub man page

This commit is contained in:
Tobias Brunner
2013-09-13 15:07:36 +02:00
parent a319eff80d
commit 4adeaa5eb9
5 changed files with 82 additions and 4 deletions
+1
View File
@@ -1499,6 +1499,7 @@ AC_CONFIG_FILES([
src/pki/man/pki---keyid.8
src/pki/man/pki---pkcs7.8
src/pki/man/pki---print.8
src/pki/man/pki---pub.8
src/pki/man/pki---req.8
src/pki/man/pki---self.8
src/pki/man/pki---signcrl.8
+2 -2
View File
@@ -158,13 +158,13 @@ static void __attribute__ ((constructor))reg()
pub, 'p', "pub",
"extract the public key from a private key/certificate",
{"[--in file|--keyid hex] [--type rsa|ecdsa|pkcs10|x509]",
"[--outform der|pem|pgp|dnskey]"},
"[--outform der|pem|dnskey]"},
{
{"help", 'h', 0, "show usage information"},
{"in", 'i', 1, "input file, default: stdin"},
{"keyid", 'x', 1, "keyid on smartcard of private key"},
{"type", 't', 1, "type of credential, default: rsa"},
{"outform", 'f', 1, "encoding of extracted public key"},
{"outform", 'f', 1, "encoding of extracted public key, default: der"},
}
});
}
+2 -1
View File
@@ -7,6 +7,7 @@ man8_MANS = \
pki---req.8 \
pki---pkcs7.8 \
pki---keyid.8 \
pki---print.8
pki---print.8 \
pki---pub.8
CLEANFILES = $(man8_MANS)
+2 -1
View File
@@ -77,4 +77,5 @@ Verify a certificate using a CA certificate.
.BR pki\ \-\-req (8),
.BR pki\ \-\-pkcs7 (8),
.BR pki\ \-\-keyid (8),
.BR pki\ \-\-print (8)
.BR pki\ \-\-print (8),
.BR pki\ \-\-pub (8)
+75
View File
@@ -0,0 +1,75 @@
.TH "PKI \-\-PUB" 8 "2013-07-31" "@PACKAGE_VERSION@" "strongSwan"
.
.SH "NAME"
.
pki \-\-pub \- Extract a public key from a private key or certificate
.
.SH "SYNOPSIS"
.
.SY pki\ \-\-pub
.RB [ \-\-in
.IR file | \fB\-\-keyid\fR
.IR hex ]
.OP \-\-type type
.OP \-\-outform encoding
.OP \-\-debug level
.YS
.
.SY pki\ \-\-pub
.BI \-\-options\~ file
.YS
.
.SY "pki \-\-pub"
.B \-h
|
.B \-\-help
.YS
.
.SH "DESCRIPTION"
.
This sub-command of
.BR ipsec\-pki (8)
extracts public keys from a private keys and certificates.
.
.SH "OPTIONS"
.
.TP
.B "\-h, \-\-help"
Print usage information with a summary of the available options.
.TP
.BI "\-v, \-\-debug " level
Set debug level, default: 1.
.TP
.BI "\-+, \-\-options " file
Read command line options from \fIfile\fR.
.TP
.BI "\-i, \-\-in " file
Input file. If not given the input is read from \fISTDIN\fR.
.TP
.BI "\-t, \-\-type " type
Type of input. One of \fIrsa\fR (RSA private key), \fIecdsa\fR (ECDSA
private key), \fIpkcs10\fR (PKCS#10 certificate request), \fIx509\fR (X.509
certificate), defaults to \fIrsa\fR.
.TP
.BI "\-f, \-\-outform " encoding
Encoding of the extracted public key. One of \fIder\fR (ASN.1 DER), \fIpem\fR
(Base64 PEM), or \fIdnskey\fR (RFC 3110 DNS key), defaults to \fIder\fR.
.
.SH "EXAMPLES"
.
Extract the public key from an RSA private key:
.PP
.EX
ipsec pki --pub --in key.der > pub.der
.EE
.PP
Extract the public key from an X.509 certificate:
.PP
.EX
ipsec pki --pub --in cert.der --type x509 > pub.der
.EE
.PP
.
.SH "SEE ALSO"
.
.BR ipsec\-pki (8)