1 .TH "PKI \-\-ISSUE" 1 "2016-12-13" "@PACKAGE_VERSION@" "strongSwan"
5 pki \-\-issue \- Issue a certificate using a CA certificate and key
12 .BI \-\-cakey\~ file |\-\-cakeyid\~ hex
15 .OP \-\-san subjectAltName
17 .OP \-\-not-before datetime
18 .OP \-\-not-after datetime
23 .OP \-\-crl uri\ \fR[\fB\-\-crlissuer\ \fIissuer\fR]
26 .OP \-\-nc-permitted name
27 .OP \-\-addrblock block
28 .OP \-\-nc-excluded name
29 .OP \-\-policy\-mapping mapping
30 .OP \-\-policy\-explicit len
31 .OP \-\-policy\-inhibit len
32 .OP \-\-policy\-any len
33 .OP \-\-cert\-policy oid\ \fR[\fB\-\-cps\-uri\ \fIuri\fR]\ \fR[\fB\-\-user\-notice\ \fItext\fR]
34 .OP \-\-outform encoding
39 .BI \-\-options\~ file
52 is used to issue a certificate using a CA certificate and private key.
58 Print usage information with a summary of the available options.
60 .BI "\-v, \-\-debug " level
61 Set debug level, default: 1.
63 .BI "\-+, \-\-options " file
64 Read command line options from \fIfile\fR.
66 .BI "\-i, \-\-in " file
67 Public key or PKCS#10 certificate request file to issue. If not given the
68 key/request is read from \fISTDIN\fR.
70 .BI "\-t, \-\-type " type
71 Type of the input. One of \fIpub\fR (public key), \fIpriv\fR (private key),
72 \fIrsa\fR (RSA private key), \fIecdsa\fR (ECDSA private key),
73 \fIed25519\fR (Ed25519 private key) \fIbliss\fR (BLISS private key) or
74 \fIpkcs10\fR (PKCS#10 certificate request), defaults to \fIpub\fR.
76 .BI "\-k, \-\-cakey " file
77 CA private key file. Either this or
81 .BI "\-x, \-\-cakeyid " hex
82 Key ID of a CA private key on a smartcard. Either this or
86 .BI "\-c, \-\-cacert " file
87 CA certificate file. Required.
89 .BI "\-d, \-\-dn " subject-dn
90 Subject distinguished name (DN) of the issued certificate.
92 .BI "\-a, \-\-san " subjectAltName
93 subjectAltName extension to include in certificate. Can be used multiple times.
95 .BI "\-l, \-\-lifetime " days
96 Days the certificate is valid, default: 1095. Ignored if both
97 an absolute start and end time are given.
99 .BI "\-F, \-\-not-before " datetime
100 Absolute time when the validity of the certificate begins. The datetime format
105 .BI "\-T, \-\-not-after " datetime
106 Absolute time when the validity of the certificate ends. The datetime format is
111 .BI "\-D, \-\-dateform " form
112 strptime(3) format for the
119 .BI "\-s, \-\-serial " hex
120 Serial number in hex. It is randomly allocated by default.
122 .BI "\-e, \-\-flag " flag
123 Add extendedKeyUsage flag. One of \fIserverAuth\fR, \fIclientAuth\fR,
124 \fIcrlSign\fR, or \fIocspSigning\fR. Can be used multiple times.
126 .BI "\-g, \-\-digest " digest
127 Digest to use for signature creation. One of \fImd5\fR, \fIsha1\fR,
128 \fIsha224\fR, \fIsha256\fR, \fIsha384\fR, or \fIsha512\fR. The default is
129 determined based on the type and size of the signature key.
131 .BI "\-f, \-\-outform " encoding
132 Encoding of the created certificate file. Either \fIder\fR (ASN.1 DER) or
133 \fIpem\fR (Base64 PEM), defaults to \fIder\fR.
136 Include CA basicConstraint extension in certificate.
138 .BI "\-u, \-\-crl " uri
139 CRL distribution point URI to include in certificate. Can be used multiple
142 .BI "\-I, \-\-crlissuer " issuer
143 Optional CRL issuer for the CRL at the preceding distribution point.
145 .BI "\-o, \-\-ocsp " uri
146 OCSP AuthorityInfoAccess URI to include in certificate. Can be used multiple
149 .BI "\-p, \-\-pathlen " len
150 Set path length constraint.
152 .BI "\-B, \-\-addrblock " block
153 RFC 3779 address block to include in certificate. \fIblock\fR is either a
154 CIDR subnet (such as \fI10.0.0.0/8\fR) or an arbitrary address range
155 (\fI192.168.1.7-192.168.1.13\fR). Can be repeated to include multiple blocks.
157 .BI "\-n, \-\-nc-permitted " name
158 Add permitted NameConstraint extension to certificate. For DNS or email
159 constraints, the identity type is not always detectable by the given name. Use
164 prefix to force a constraint type.
166 .BI "\-N, \-\-nc-excluded " name
167 Add excluded NameConstraint extension to certificate. For DNS or email
168 constraints, the identity type is not always detectable by the given name. Use
173 prefix to force a constraint type.
175 .BI "\-M, \-\-policy-mapping " issuer-oid:subject-oid
176 Add policyMapping from issuer to subject OID.
178 .BI "\-E, \-\-policy-explicit " len
179 Add requireExplicitPolicy constraint.
181 .BI "\-H, \-\-policy-inhibit " len
182 Add inhibitPolicyMapping constraint.
184 .BI "\-A, \-\-policy-any " len
185 Add inhibitAnyPolicy constraint.
187 .SS "Certificate Policy"
188 Multiple certificatePolicy extensions can be added. Each with the following
191 .BI "\-P, \-\-cert-policy " oid
192 OID to include in certificatePolicy extension. Required.
194 .BI "\-C, \-\-cps-uri " uri
195 Certification Practice statement URI for certificatePolicy.
197 .BI "\-U, \-\-user-notice " text
198 User notice for certificatePolicy.
202 To save repetitive typing, command line options can be stored in files.
205 contains the following contents:
208 --cacert ca_cert.der --cakey ca_key.der --digest sha256
209 --flag serverAuth --lifetime 1460 --type pkcs10
212 Then the following command can be used to issue a certificate based on a
213 given PKCS#10 certificate request and the options above:
216 pki --issue --options pki.opt --in req.der > cert.der