1PKI --ISSUE(1)                    strongSwan                    PKI --ISSUE(1)
2
3
4

NAME

6       pki --issue - Issue a certificate using a CA certificate and key
7

SYNOPSIS

9       pki --issue [--in file] [--type type] --cakey file|--cakeyid hex
10                   --cacert file [--dn subject-dn] [--san subjectAltName]
11                   [--lifetime days] [--not-before datetime] [--not-
12                   after datetime] [--serial hex] [--flag flag]
13                   [--digest digest] [--rsa-padding padding] [--ca]
14                   [--crl uri [--crlissuer issuer]] [--ocsp uri]
15                   [--pathlen len] [--addrblock block] [--nc-permitted name]
16                   [--nc-excluded name] [--critical oid]
17                   [--policy-mapping mapping] [--policy-explicit len]
18                   [--policy-inhibit len] [--policy-any len]
19                   [--cert-policy oid [--cps-uri uri] [--user-notice text]]
20                   [--outform encoding] [--debug level]
21
22       pki --issue --options file
23
24       pki --issue -h | --help
25

DESCRIPTION

27       This sub-command of pki(1) is used to issue a certificate  using  a  CA
28       certificate and private key.
29

OPTIONS

31       -h, --help
32              Print usage information with a summary of the available options.
33
34       -v, --debug level
35              Set debug level, default: 1.
36
37       -+, --options file
38              Read command line options from file.
39
40       -i, --in file
41              Public  key or PKCS#10 certificate request file to issue. If not
42              given the key/request is read from STDIN.
43
44       -t, --type type
45              Type of the input. One of pub (public key), priv (private  key),
46              rsa  (RSA  private  key),  ecdsa  (ECDSA  private  key), ed25519
47              (Ed25519 private key), ed448 (Ed448 private key),  bliss  (BLISS
48              private  key)  or pkcs10 (PKCS#10 certificate request), defaults
49              to pub.
50
51       -k, --cakey file
52              CA private key file. Either this or --cakeyid is required.
53
54       -x, --cakeyid hex
55              Smartcard or TPM CA private key object handle in hex format with
56              an optional 0x prefix. Either this or --cakey is required.
57
58       -c, --cacert file
59              CA certificate file. Required.
60
61       -d, --dn subject-dn
62              Subject distinguished name (DN) of the issued certificate.
63
64       -a, --san subjectAltName
65              subjectAltName  extension to include in certificate. Can be used
66              multiple times.
67
68       -l, --lifetime days
69              Days the certificate is valid, default: 1095. Ignored if both an
70              absolute start and end time are given.
71
72       -F, --not-before datetime
73              Absolute  time  when the validity of the certificate begins. The
74              datetime format is defined by the --dateform option.
75
76       -T, --not-after datetime
77              Absolute time when the validity of  the  certificate  ends.  The
78              datetime format is defined by the --dateform option.
79
80       -D, --dateform form
81              strptime(3) format for the --not-before and --not-after options,
82              default: %d.%m.%y %T
83
84       -s, --serial hex
85              Serial number in hex. It is randomly allocated by default.
86
87       -e, --flag flag
88              Add extendedKeyUsage flag. One of serverAuth,  clientAuth,  crl‐
89              Sign,  ocspSigning  or  msSmartcardLogon.  Can  be used multiple
90              times. Without modifiers, this overrides flags from PKCS#10 cer‐
91              tificate requests. Prefixing a flag with + adds it to the set of
92              flags read from the request, prefixing it with - removes it from
93              that set.
94
95       -g, --digest digest
96              Digest  to use for signature creation. One of md5, sha1, sha224,
97              sha256, sha384, or sha512.  The default is determined  based  on
98              the type and size of the signature key.
99
100       -R, --rsa-padding padding
101              Padding to use for RSA signatures. Either pkcs1 or pss, defaults
102              to pkcs1.
103
104       -f, --outform encoding
105              Encoding of the created certificate file. Either der (ASN.1 DER)
106              or pem (Base64 PEM), defaults to der.
107
108       -b, --ca
109              Include CA basicConstraint extension in certificate.
110
111       -u, --crl uri
112              CRL  distribution  point  URI  to include in certificate. Can be
113              used multiple times.
114
115       -I, --crlissuer issuer
116              Optional CRL issuer for the CRL at  the  preceding  distribution
117              point.
118
119       -o, --ocsp uri
120              OCSP  AuthorityInfoAccess  URI to include in certificate. Can be
121              used multiple times.
122
123       -p, --pathlen len
124              Set path length constraint.
125
126       -B, --addrblock block
127              RFC 3779 address block to include in certificate. block  is  ei‐
128              ther  a CIDR subnet (such as 10.0.0.0/8) or an arbitrary address
129              range (192.168.1.7-192.168.1.13). Can  be  repeated  to  include
130              multiple  blocks.   Please note that the supplied blocks are in‐
131              cluded in the certificate as is, so  for  standards  compliance,
132              multiple  blocks  must be supplied in correct order and adjacent
133              blocks must be combined. Refer to RFC 3779 for details.
134
135       -n, --nc-permitted name
136              Add permitted NameConstraint extension to certificate.  For  DNS
137              or email constraints, the identity type is not always detectable
138              by the given name. Use the dns: or email: prefix to force a con‐
139              straint type.
140
141       -N, --nc-excluded name
142              Add excluded NameConstraint extension to certificate. For DNS or
143              email constraints, the identity type is not always detectable by
144              the  given  name.  Use the dns: or email: prefix to force a con‐
145              straint type.
146
147       -X, --critical oid
148              Add a critical extension with the given OID.
149
150       -M, --policy-mapping issuer-oid:subject-oid
151              Add policyMapping from issuer to subject OID.
152
153       -E, --policy-explicit len
154              Add requireExplicitPolicy constraint.
155
156       -H, --policy-inhibit len
157              Add inhibitPolicyMapping constraint.
158
159       -A, --policy-any len
160              Add inhibitAnyPolicy constraint.
161
162   Certificate Policy
163       Multiple certificatePolicy extensions can be added. Each with the  fol‐
164       lowing information:
165
166       -P, --cert-policy oid
167              OID to include in certificatePolicy extension. Required.
168
169       -C, --cps-uri uri
170              Certification Practice statement URI for certificatePolicy.
171
172       -U, --user-notice text
173              User notice for certificatePolicy.
174

EXAMPLES

176       To save repetitive typing, command line options can be stored in files.
177       Lets assume pki.opt contains the following contents:
178
179         --cacert ca_cert.der --cakey ca_key.der --digest sha256
180         --flag serverAuth --lifetime 1460 --type pkcs10
181
182       Then the following command can be used to issue a certificate based  on
183       a given PKCS#10 certificate request and the options above:
184
185         pki --issue --options pki.opt --in req.der > cert.der
186

SEE ALSO

188       pki(1)
189
190
191
1925.9.11                            2019-05-06                    PKI --ISSUE(1)
Impressum