pki: Add pki --pub man page
authorTobias Brunner <tobias@strongswan.org>
Mon, 12 Aug 2013 15:46:40 +0000 (17:46 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 13 Sep 2013 13:07:36 +0000 (15:07 +0200)
configure.ac
src/pki/commands/pub.c
src/pki/man/Makefile.am
src/pki/man/ipsec-pki.8.in
src/pki/man/pki---pub.8.in [new file with mode: 0644]

index af8a34b..beca13c 100644 (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
index 9912061..5a658af 100644 (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"},
                }
        });
 }
index 7b61065..a4c092b 100644 (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)
index 1a6a24c..cea88a3 100644 (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)
diff --git a/src/pki/man/pki---pub.8.in b/src/pki/man/pki---pub.8.in
new file mode 100644 (file)
index 0000000..38e7516
--- /dev/null
@@ -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)
\ No newline at end of file