Project

General

Profile

pki --issue » History » Version 3

Andreas Steffen, 17.10.2009 09:13
added pki --issue example

1 1 Andreas Steffen
h1. ipsec pki --issue
2 1 Andreas Steffen
3 1 Andreas Steffen
h2. Synopsis
4 1 Andreas Steffen
5 1 Andreas Steffen
<pre>
6 1 Andreas Steffen
pki --issue [--in file] [--type pub|pkcs10] --cacert file --cakey file --dn subject-dn
7 1 Andreas Steffen
            [--san subjectAltName]+ [--lifetime days] [--serial hex]
8 2 Andreas Steffen
            [--ca] [--crl uri]+ [--ocsp uri]+ [--flag serverAuth|ocspSigning]+
9 1 Andreas Steffen
            [--digest md5|sha1|sha224|sha256|sha384|sha512]
10 1 Andreas Steffen
11 1 Andreas Steffen
           --help     (-h)  show usage information
12 1 Andreas Steffen
           --in       (-i)  public key/request file to issue, default: stdin
13 1 Andreas Steffen
           --type     (-t)  type of input, default: pub
14 1 Andreas Steffen
           --cacert   (-c)  CA certificate file
15 1 Andreas Steffen
           --cakey    (-k)  CA private key file
16 1 Andreas Steffen
           --dn       (-d)  distinguished name to include as subject
17 1 Andreas Steffen
           --san      (-a)  subjectAltName to include in certificate
18 1 Andreas Steffen
           --lifetime (-l)  days the certificate is valid, default: 1080
19 1 Andreas Steffen
           --serial   (-s)  serial number in hex, default: random
20 1 Andreas Steffen
           --ca       (-b)  include CA basicConstraint, default: no
21 2 Andreas Steffen
           --flag     (-f)  include extendedKeyUsage flag
22 1 Andreas Steffen
           --crl      (-u)  CRL distribution point URI to include
23 1 Andreas Steffen
           --ocsp     (-o)  OCSP AuthorityInfoAccess URI to include
24 1 Andreas Steffen
           --digest   (-g)  digest for signature creation, default: sha1
25 1 Andreas Steffen
           --debug    (-v)  set debug level, default: 1
26 1 Andreas Steffen
           --options  (-+)  read command line options from file
27 1 Andreas Steffen
</pre>
28 1 Andreas Steffen
29 1 Andreas Steffen
h2. Description
30 1 Andreas Steffen
31 1 Andreas Steffen
Issue a an X.509 certificate by signing with a CA private key.
32 3 Andreas Steffen
33 3 Andreas Steffen
h2. Examples
34 3 Andreas Steffen
35 3 Andreas Steffen
* Create an options file to save repetitive typing work
36 3 Andreas Steffen
37 3 Andreas Steffen
<pre>
38 3 Andreas Steffen
cat > pki.opt
39 3 Andreas Steffen
--cacert caCert.der --cakey caKey.der --digest sha256
40 3 Andreas Steffen
--flag serverAuth --lifetime 1460
41 3 Andreas Steffen
--type pkcs10
42 3 Andreas Steffen
</pre>
43 3 Andreas Steffen
44 3 Andreas Steffen
* Issue a CA-signed certificat based on a PKCS10 certificate request
45 3 Andreas Steffen
46 3 Andreas Steffen
<pre>
47 3 Andreas Steffen
pki --issue --options pki.opt --serial 01 --in myReq.der > myCert.der
48 3 Andreas Steffen
</pre>