Project

General

Profile

pki --issue » History » Version 11

Tobias Brunner, 14.04.2014 14:55

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 10 Tobias Brunner
pki --issue [--in file] [--type pub|pkcs10] --cakey file|--cakeyid hex
7 1 Andreas Steffen
             --cacert file [--dn subject-dn] [--san subjectAltName]+
8 11 Tobias Brunner
            [--lifetime days] [--not-before datetime] [--not-after datetime] [--serial hex]
9 11 Tobias Brunner
            [--ca] [--pathlen len] [--flag serverAuth|clientAuth|crlSign|ocspSigning]+
10 10 Tobias Brunner
            [--crl uri [--crlissuer i]]+ [--ocsp uri]+ [--nc-permitted name]
11 10 Tobias Brunner
            [--nc-excluded name] [--policy-map issuer-oid:subject-oid]
12 9 Andreas Steffen
            [--policy-explicit len] [--policy-inhibit len] [--policy-any len]
13 10 Tobias Brunner
            [--cert-policy oid [--cps-uri uri] [--user-notice text]]+
14 1 Andreas Steffen
            [--digest md5|sha1|sha224|sha256|sha384|sha512] [--outform der|pem]
15 1 Andreas Steffen
16 9 Andreas Steffen
           --help            (-h)  show usage information
17 9 Andreas Steffen
           --in              (-i)  public key/request file to issue, default: stdin
18 9 Andreas Steffen
           --type            (-t)  type of input, default: pub
19 9 Andreas Steffen
           --cacert          (-c)  CA certificate file
20 9 Andreas Steffen
           --cakey           (-k)  CA private key file
21 9 Andreas Steffen
           --cakeyid         (-x)  keyid on smartcard of CA private key
22 9 Andreas Steffen
           --dn              (-d)  distinguished name to include as subject
23 1 Andreas Steffen
           --san             (-a)  subjectAltName to include in certificate
24 1 Andreas Steffen
           --lifetime        (-l)  days the certificate is valid, default: 1095
25 11 Tobias Brunner
           --not-before      (-F)  absolute time when the validity of the certificate begins
26 11 Tobias Brunner
           --not-after       (-T)  absolute time when the validity of the certificate ends
27 11 Tobias Brunner
           --dateform        (-D)  strptime(3) format for the --not-before and --not-after options, default: %d.%m.%y %T
28 9 Andreas Steffen
           --serial          (-s)  serial number in hex, default: random
29 9 Andreas Steffen
           --ca              (-b)  include CA basicConstraint, default: no
30 9 Andreas Steffen
           --pathlen         (-p)  set path length constraint
31 9 Andreas Steffen
           --nc-permitted    (-n)  add permitted NameConstraint
32 9 Andreas Steffen
           --nc-excluded     (-N)  add excluded NameConstraint
33 9 Andreas Steffen
           --cert-policy     (-P)  certificatePolicy OID to include
34 9 Andreas Steffen
           --cps-uri         (-C)  Certification Practice statement URI for certificatePolicy
35 9 Andreas Steffen
           --user-notice     (-U)  user notice for certificatePolicy
36 9 Andreas Steffen
           --policy-mapping  (-M)  policyMapping from issuer to subject OID
37 9 Andreas Steffen
           --policy-explicit (-E)  requireExplicitPolicy constraint
38 9 Andreas Steffen
           --policy-inhibit  (-H)  inhibitPolicyMapping constraint
39 9 Andreas Steffen
           --policy-any      (-A)  inhibitAnyPolicy constraint
40 9 Andreas Steffen
           --flag            (-e)  include extendedKeyUsage flag
41 9 Andreas Steffen
           --crl             (-u)  CRL distribution point URI to include
42 9 Andreas Steffen
           --crlissuer       (-I)  CRL Issuer for CRL at distribution point
43 9 Andreas Steffen
           --ocsp            (-o)  OCSP AuthorityInfoAccess URI to include
44 9 Andreas Steffen
           --digest          (-g)  digest for signature creation, default: sha1
45 9 Andreas Steffen
           --outform         (-f)  encoding of generated cert, default: der
46 9 Andreas Steffen
           --debug           (-v)  set debug level, default: 1
47 9 Andreas Steffen
           --options         (-+)  read command line options from file
48 1 Andreas Steffen
</pre>
49 1 Andreas Steffen
50 4 Andreas Steffen
h2. Description
51 3 Andreas Steffen
52 3 Andreas Steffen
Issue an X.509 certificate signed with a CA's private key.
53 3 Andreas Steffen
54 3 Andreas Steffen
h2. Examples
55 3 Andreas Steffen
56 3 Andreas Steffen
* Create an options file to save repetitive typing work
57 3 Andreas Steffen
58 3 Andreas Steffen
<pre>
59 3 Andreas Steffen
cat > pki.opt
60 3 Andreas Steffen
--cacert caCert.der --cakey caKey.der --digest sha256
61 3 Andreas Steffen
--flag serverAuth --lifetime 1460
62 3 Andreas Steffen
--type pkcs10
63 3 Andreas Steffen
</pre>
64 3 Andreas Steffen
65 3 Andreas Steffen
* Issue a CA-signed certificat based on a PKCS10 certificate request
66 3 Andreas Steffen
67 3 Andreas Steffen
<pre>
68 1 Andreas Steffen
pki --issue --options pki.opt --serial 01 --in myReq.der > myCert.der
69 1 Andreas Steffen
</pre>