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
22 .OP \-\-rsa\-padding padding
24 .OP \-\-crl uri\ \fR[\fB\-\-crlissuer\ \fIissuer\fR]
27 .OP \-\-nc-permitted name
28 .OP \-\-addrblock block
29 .OP \-\-nc-excluded name
30 .OP \-\-policy\-mapping mapping
31 .OP \-\-policy\-explicit len
32 .OP \-\-policy\-inhibit len
33 .OP \-\-policy\-any len
34 .OP \-\-cert\-policy oid\ \fR[\fB\-\-cps\-uri\ \fIuri\fR]\ \fR[\fB\-\-user\-notice\ \fItext\fR]
35 .OP \-\-outform encoding
40 .BI \-\-options\~ file
53 is used to issue a certificate using a CA certificate and private key.
59 Print usage information with a summary of the available options.
61 .BI "\-v, \-\-debug " level
62 Set debug level, default: 1.
64 .BI "\-+, \-\-options " file
65 Read command line options from \fIfile\fR.
67 .BI "\-i, \-\-in " file
68 Public key or PKCS#10 certificate request file to issue. If not given the
69 key/request is read from \fISTDIN\fR.
71 .BI "\-t, \-\-type " type
72 Type of the input. One of \fIpub\fR (public key), \fIpriv\fR (private key),
73 \fIrsa\fR (RSA private key), \fIecdsa\fR (ECDSA private key),
74 \fIed25519\fR (Ed25519 private key) \fIbliss\fR (BLISS private key) or
75 \fIpkcs10\fR (PKCS#10 certificate request), defaults to \fIpub\fR.
77 .BI "\-k, \-\-cakey " file
78 CA private key file. Either this or
82 .BI "\-x, \-\-cakeyid " hex
83 Smartcard or TPM CA private key object handle in hex format with an optional
84 0x prefix. Either this or
88 .BI "\-c, \-\-cacert " file
89 CA certificate file. Required.
91 .BI "\-d, \-\-dn " subject-dn
92 Subject distinguished name (DN) of the issued certificate.
94 .BI "\-a, \-\-san " subjectAltName
95 subjectAltName extension to include in certificate. Can be used multiple times.
97 .BI "\-l, \-\-lifetime " days
98 Days the certificate is valid, default: 1095. Ignored if both
99 an absolute start and end time are given.
101 .BI "\-F, \-\-not-before " datetime
102 Absolute time when the validity of the certificate begins. The datetime format
107 .BI "\-T, \-\-not-after " datetime
108 Absolute time when the validity of the certificate ends. The datetime format is
113 .BI "\-D, \-\-dateform " form
114 strptime(3) format for the
121 .BI "\-s, \-\-serial " hex
122 Serial number in hex. It is randomly allocated by default.
124 .BI "\-e, \-\-flag " flag
125 Add extendedKeyUsage flag. One of \fIserverAuth\fR, \fIclientAuth\fR,
126 \fIcrlSign\fR, or \fIocspSigning\fR. Can be used multiple times.
128 .BI "\-g, \-\-digest " digest
129 Digest to use for signature creation. One of \fImd5\fR, \fIsha1\fR,
130 \fIsha224\fR, \fIsha256\fR, \fIsha384\fR, or \fIsha512\fR. The default is
131 determined based on the type and size of the signature key.
133 .BI "\-R, \-\-rsa\-padding " padding
134 Padding to use for RSA signatures. Either \fIpkcs1\fR or \fIpss\fR, defaults
137 .BI "\-f, \-\-outform " encoding
138 Encoding of the created certificate file. Either \fIder\fR (ASN.1 DER) or
139 \fIpem\fR (Base64 PEM), defaults to \fIder\fR.
142 Include CA basicConstraint extension in certificate.
144 .BI "\-u, \-\-crl " uri
145 CRL distribution point URI to include in certificate. Can be used multiple
148 .BI "\-I, \-\-crlissuer " issuer
149 Optional CRL issuer for the CRL at the preceding distribution point.
151 .BI "\-o, \-\-ocsp " uri
152 OCSP AuthorityInfoAccess URI to include in certificate. Can be used multiple
155 .BI "\-p, \-\-pathlen " len
156 Set path length constraint.
158 .BI "\-B, \-\-addrblock " block
159 RFC 3779 address block to include in certificate. \fIblock\fR is either a
160 CIDR subnet (such as \fI10.0.0.0/8\fR) or an arbitrary address range
161 (\fI192.168.1.7-192.168.1.13\fR). Can be repeated to include multiple blocks.
162 Please note that the supplied blocks are included in the certificate as is,
163 so for standards compliance, multiple blocks must be supplied in correct
164 order and adjacent blocks must be combined. Refer to RFC 3779 for details.
166 .BI "\-n, \-\-nc-permitted " name
167 Add permitted 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 "\-N, \-\-nc-excluded " name
176 Add excluded NameConstraint extension to certificate. For DNS or email
177 constraints, the identity type is not always detectable by the given name. Use
182 prefix to force a constraint type.
184 .BI "\-M, \-\-policy-mapping " issuer-oid:subject-oid
185 Add policyMapping from issuer to subject OID.
187 .BI "\-E, \-\-policy-explicit " len
188 Add requireExplicitPolicy constraint.
190 .BI "\-H, \-\-policy-inhibit " len
191 Add inhibitPolicyMapping constraint.
193 .BI "\-A, \-\-policy-any " len
194 Add inhibitAnyPolicy constraint.
196 .SS "Certificate Policy"
197 Multiple certificatePolicy extensions can be added. Each with the following
200 .BI "\-P, \-\-cert-policy " oid
201 OID to include in certificatePolicy extension. Required.
203 .BI "\-C, \-\-cps-uri " uri
204 Certification Practice statement URI for certificatePolicy.
206 .BI "\-U, \-\-user-notice " text
207 User notice for certificatePolicy.
211 To save repetitive typing, command line options can be stored in files.
214 contains the following contents:
217 --cacert ca_cert.der --cakey ca_key.der --digest sha256
218 --flag serverAuth --lifetime 1460 --type pkcs10
221 Then the following command can be used to issue a certificate based on a
222 given PKCS#10 certificate request and the options above:
225 pki --issue --options pki.opt --in req.der > cert.der