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.
156 Please note that the supplied blocks are included in the certificate as is,
157 so for standards compliance, multiple blocks must be supplied in correct
158 order and adjacent blocks must be combined. Refer to RFC 3779 for details.
160 .BI "\-n, \-\-nc-permitted " name
161 Add permitted NameConstraint extension to certificate. For DNS or email
162 constraints, the identity type is not always detectable by the given name. Use
167 prefix to force a constraint type.
169 .BI "\-N, \-\-nc-excluded " name
170 Add excluded NameConstraint extension to certificate. For DNS or email
171 constraints, the identity type is not always detectable by the given name. Use
176 prefix to force a constraint type.
178 .BI "\-M, \-\-policy-mapping " issuer-oid:subject-oid
179 Add policyMapping from issuer to subject OID.
181 .BI "\-E, \-\-policy-explicit " len
182 Add requireExplicitPolicy constraint.
184 .BI "\-H, \-\-policy-inhibit " len
185 Add inhibitPolicyMapping constraint.
187 .BI "\-A, \-\-policy-any " len
188 Add inhibitAnyPolicy constraint.
190 .SS "Certificate Policy"
191 Multiple certificatePolicy extensions can be added. Each with the following
194 .BI "\-P, \-\-cert-policy " oid
195 OID to include in certificatePolicy extension. Required.
197 .BI "\-C, \-\-cps-uri " uri
198 Certification Practice statement URI for certificatePolicy.
200 .BI "\-U, \-\-user-notice " text
201 User notice for certificatePolicy.
205 To save repetitive typing, command line options can be stored in files.
208 contains the following contents:
211 --cacert ca_cert.der --cakey ca_key.der --digest sha256
212 --flag serverAuth --lifetime 1460 --type pkcs10
215 Then the following command can be used to issue a certificate based on a
216 given PKCS#10 certificate request and the options above:
219 pki --issue --options pki.opt --in req.der > cert.der