xref: /freebsd/crypto/openssl/doc/man5/x509v3_config.pod (revision 58f351825a371d1a3dd693d6f64a1245ea851a51)
1e71b7053SJung-uk Kim=pod
2e71b7053SJung-uk Kim
3e71b7053SJung-uk Kim=head1 NAME
4e71b7053SJung-uk Kim
5e71b7053SJung-uk Kimx509v3_config - X509 V3 certificate extension configuration format
6e71b7053SJung-uk Kim
7e71b7053SJung-uk Kim=head1 DESCRIPTION
8e71b7053SJung-uk Kim
9e71b7053SJung-uk KimSeveral of the OpenSSL utilities can add extensions to a certificate or
10e71b7053SJung-uk Kimcertificate request based on the contents of a configuration file.
11e71b7053SJung-uk Kim
12e71b7053SJung-uk KimTypically the application will contain an option to point to an extension
13e71b7053SJung-uk Kimsection. Each line of the extension section takes the form:
14e71b7053SJung-uk Kim
15e71b7053SJung-uk Kim extension_name=[critical,] extension_options
16e71b7053SJung-uk Kim
17e71b7053SJung-uk KimIf B<critical> is present then the extension will be critical.
18e71b7053SJung-uk Kim
19e71b7053SJung-uk KimThe format of B<extension_options> depends on the value of B<extension_name>.
20e71b7053SJung-uk Kim
21e71b7053SJung-uk KimThere are four main types of extension: I<string> extensions, I<multi-valued>
22e71b7053SJung-uk Kimextensions, I<raw> and I<arbitrary> extensions.
23e71b7053SJung-uk Kim
24e71b7053SJung-uk KimString extensions simply have a string which contains either the value itself
25e71b7053SJung-uk Kimor how it is obtained.
26e71b7053SJung-uk Kim
27e71b7053SJung-uk KimFor example:
28e71b7053SJung-uk Kim
29e71b7053SJung-uk Kim nsComment="This is a Comment"
30e71b7053SJung-uk Kim
31e71b7053SJung-uk KimMulti-valued extensions have a short form and a long form. The short form
32e71b7053SJung-uk Kimis a list of names and values:
33e71b7053SJung-uk Kim
34e71b7053SJung-uk Kim basicConstraints=critical,CA:true,pathlen:1
35e71b7053SJung-uk Kim
36e71b7053SJung-uk KimThe long form allows the values to be placed in a separate section:
37e71b7053SJung-uk Kim
38e71b7053SJung-uk Kim basicConstraints=critical,@bs_section
39e71b7053SJung-uk Kim
40e71b7053SJung-uk Kim [bs_section]
41e71b7053SJung-uk Kim
42e71b7053SJung-uk Kim CA=true
43e71b7053SJung-uk Kim pathlen=1
44e71b7053SJung-uk Kim
45e71b7053SJung-uk KimBoth forms are equivalent.
46e71b7053SJung-uk Kim
47e71b7053SJung-uk KimThe syntax of raw extensions is governed by the extension code: it can
48e71b7053SJung-uk Kimfor example contain data in multiple sections. The correct syntax to
49e71b7053SJung-uk Kimuse is defined by the extension code itself: check out the certificate
50e71b7053SJung-uk Kimpolicies extension for an example.
51e71b7053SJung-uk Kim
52e71b7053SJung-uk KimIf an extension type is unsupported then the I<arbitrary> extension syntax
53e71b7053SJung-uk Kimmust be used, see the L<ARBITRARY EXTENSIONS|/"ARBITRARY EXTENSIONS"> section for more details.
54e71b7053SJung-uk Kim
55e71b7053SJung-uk Kim=head1 STANDARD EXTENSIONS
56e71b7053SJung-uk Kim
57e71b7053SJung-uk KimThe following sections describe each supported extension in detail.
58e71b7053SJung-uk Kim
59e71b7053SJung-uk Kim=head2 Basic Constraints.
60e71b7053SJung-uk Kim
61e71b7053SJung-uk KimThis is a multi valued extension which indicates whether a certificate is
62e71b7053SJung-uk Kima CA certificate. The first (mandatory) name is B<CA> followed by B<TRUE> or
63*58f35182SJung-uk KimB<FALSE>. If B<CA> is B<TRUE> then an optional B<pathlen> name followed by a
64*58f35182SJung-uk Kimnonnegative value can be included.
65e71b7053SJung-uk Kim
66e71b7053SJung-uk KimFor example:
67e71b7053SJung-uk Kim
68e71b7053SJung-uk Kim basicConstraints=CA:TRUE
69e71b7053SJung-uk Kim
70e71b7053SJung-uk Kim basicConstraints=CA:FALSE
71e71b7053SJung-uk Kim
72e71b7053SJung-uk Kim basicConstraints=critical,CA:TRUE, pathlen:0
73e71b7053SJung-uk Kim
74e71b7053SJung-uk KimA CA certificate B<must> include the basicConstraints value with the CA field
75e71b7053SJung-uk Kimset to TRUE. An end user certificate must either set CA to FALSE or exclude the
76e71b7053SJung-uk Kimextension entirely. Some software may require the inclusion of basicConstraints
77e71b7053SJung-uk Kimwith CA set to FALSE for end entity certificates.
78e71b7053SJung-uk Kim
79e71b7053SJung-uk KimThe pathlen parameter indicates the maximum number of CAs that can appear
80e71b7053SJung-uk Kimbelow this one in a chain. So if you have a CA with a pathlen of zero it can
81e71b7053SJung-uk Kimonly be used to sign end user certificates and not further CAs.
82e71b7053SJung-uk Kim
83e71b7053SJung-uk Kim
84e71b7053SJung-uk Kim=head2 Key Usage.
85e71b7053SJung-uk Kim
86e71b7053SJung-uk KimKey usage is a multi valued extension consisting of a list of names of the
87e71b7053SJung-uk Kimpermitted key usages.
88e71b7053SJung-uk Kim
89e71b7053SJung-uk KimThe supported names are: digitalSignature, nonRepudiation, keyEncipherment,
90e71b7053SJung-uk KimdataEncipherment, keyAgreement, keyCertSign, cRLSign, encipherOnly
91e71b7053SJung-uk Kimand decipherOnly.
92e71b7053SJung-uk Kim
93e71b7053SJung-uk KimExamples:
94e71b7053SJung-uk Kim
95e71b7053SJung-uk Kim keyUsage=digitalSignature, nonRepudiation
96e71b7053SJung-uk Kim
97e71b7053SJung-uk Kim keyUsage=critical, keyCertSign
98e71b7053SJung-uk Kim
99e71b7053SJung-uk Kim
100e71b7053SJung-uk Kim=head2 Extended Key Usage.
101e71b7053SJung-uk Kim
102e71b7053SJung-uk KimThis extensions consists of a list of usages indicating purposes for which
103e71b7053SJung-uk Kimthe certificate public key can be used for,
104e71b7053SJung-uk Kim
105e71b7053SJung-uk KimThese can either be object short names or the dotted numerical form of OIDs.
106e71b7053SJung-uk KimWhile any OID can be used only certain values make sense. In particular the
107e71b7053SJung-uk Kimfollowing PKIX, NS and MS values are meaningful:
108e71b7053SJung-uk Kim
109e71b7053SJung-uk Kim Value                  Meaning
110e71b7053SJung-uk Kim -----                  -------
111e71b7053SJung-uk Kim serverAuth             SSL/TLS Web Server Authentication.
112e71b7053SJung-uk Kim clientAuth             SSL/TLS Web Client Authentication.
113e71b7053SJung-uk Kim codeSigning            Code signing.
114e71b7053SJung-uk Kim emailProtection        E-mail Protection (S/MIME).
115e71b7053SJung-uk Kim timeStamping           Trusted Timestamping
116e71b7053SJung-uk Kim OCSPSigning            OCSP Signing
117e71b7053SJung-uk Kim ipsecIKE               ipsec Internet Key Exchange
118e71b7053SJung-uk Kim msCodeInd              Microsoft Individual Code Signing (authenticode)
119e71b7053SJung-uk Kim msCodeCom              Microsoft Commercial Code Signing (authenticode)
120e71b7053SJung-uk Kim msCTLSign              Microsoft Trust List Signing
121e71b7053SJung-uk Kim msEFS                  Microsoft Encrypted File System
122e71b7053SJung-uk Kim
123e71b7053SJung-uk KimExamples:
124e71b7053SJung-uk Kim
125e71b7053SJung-uk Kim extendedKeyUsage=critical,codeSigning,1.2.3.4
126e71b7053SJung-uk Kim extendedKeyUsage=serverAuth,clientAuth
127e71b7053SJung-uk Kim
128e71b7053SJung-uk Kim
129e71b7053SJung-uk Kim=head2 Subject Key Identifier.
130e71b7053SJung-uk Kim
131e71b7053SJung-uk KimThis is really a string extension and can take two possible values. Either
132e71b7053SJung-uk Kimthe word B<hash> which will automatically follow the guidelines in RFC3280
133e71b7053SJung-uk Kimor a hex string giving the extension value to include. The use of the hex
134e71b7053SJung-uk Kimstring is strongly discouraged.
135e71b7053SJung-uk Kim
136e71b7053SJung-uk KimExample:
137e71b7053SJung-uk Kim
138e71b7053SJung-uk Kim subjectKeyIdentifier=hash
139e71b7053SJung-uk Kim
140e71b7053SJung-uk Kim
141e71b7053SJung-uk Kim=head2 Authority Key Identifier.
142e71b7053SJung-uk Kim
143e71b7053SJung-uk KimThe authority key identifier extension permits two options. keyid and issuer:
144e71b7053SJung-uk Kimboth can take the optional value "always".
145e71b7053SJung-uk Kim
146e71b7053SJung-uk KimIf the keyid option is present an attempt is made to copy the subject key
147e71b7053SJung-uk Kimidentifier from the parent certificate. If the value "always" is present
148e71b7053SJung-uk Kimthen an error is returned if the option fails.
149e71b7053SJung-uk Kim
150e71b7053SJung-uk KimThe issuer option copies the issuer and serial number from the issuer
151e71b7053SJung-uk Kimcertificate. This will only be done if the keyid option fails or
152e71b7053SJung-uk Kimis not included unless the "always" flag will always include the value.
153e71b7053SJung-uk Kim
154e71b7053SJung-uk KimExample:
155e71b7053SJung-uk Kim
156e71b7053SJung-uk Kim authorityKeyIdentifier=keyid,issuer
157e71b7053SJung-uk Kim
158e71b7053SJung-uk Kim
159e71b7053SJung-uk Kim=head2 Subject Alternative Name.
160e71b7053SJung-uk Kim
161e71b7053SJung-uk KimThe subject alternative name extension allows various literal values to be
162e71b7053SJung-uk Kimincluded in the configuration file. These include B<email> (an email address)
163e71b7053SJung-uk KimB<URI> a uniform resource indicator, B<DNS> (a DNS domain name), B<RID> (a
164e71b7053SJung-uk Kimregistered ID: OBJECT IDENTIFIER), B<IP> (an IP address), B<dirName>
165e71b7053SJung-uk Kim(a distinguished name) and otherName.
166e71b7053SJung-uk Kim
167e71b7053SJung-uk KimThe email option include a special 'copy' value. This will automatically
168e71b7053SJung-uk Kiminclude any email addresses contained in the certificate subject name in
169e71b7053SJung-uk Kimthe extension.
170e71b7053SJung-uk Kim
171e71b7053SJung-uk KimThe IP address used in the B<IP> options can be in either IPv4 or IPv6 format.
172e71b7053SJung-uk Kim
173e71b7053SJung-uk KimThe value of B<dirName> should point to a section containing the distinguished
174e71b7053SJung-uk Kimname to use as a set of name value pairs. Multi values AVAs can be formed by
175e71b7053SJung-uk Kimprefacing the name with a B<+> character.
176e71b7053SJung-uk Kim
177e71b7053SJung-uk KimotherName can include arbitrary data associated with an OID: the value
178e71b7053SJung-uk Kimshould be the OID followed by a semicolon and the content in standard
179e71b7053SJung-uk KimL<ASN1_generate_nconf(3)> format.
180e71b7053SJung-uk Kim
181e71b7053SJung-uk KimExamples:
182e71b7053SJung-uk Kim
183e71b7053SJung-uk Kim subjectAltName=email:copy,email:my@other.address,URI:http://my.url.here/
184e71b7053SJung-uk Kim subjectAltName=IP:192.168.7.1
185e71b7053SJung-uk Kim subjectAltName=IP:13::17
186e71b7053SJung-uk Kim subjectAltName=email:my@other.address,RID:1.2.3.4
187e71b7053SJung-uk Kim subjectAltName=otherName:1.2.3.4;UTF8:some other identifier
188e71b7053SJung-uk Kim
189e71b7053SJung-uk Kim subjectAltName=dirName:dir_sect
190e71b7053SJung-uk Kim
191e71b7053SJung-uk Kim [dir_sect]
192e71b7053SJung-uk Kim C=UK
193e71b7053SJung-uk Kim O=My Organization
194e71b7053SJung-uk Kim OU=My Unit
195e71b7053SJung-uk Kim CN=My Name
196e71b7053SJung-uk Kim
197e71b7053SJung-uk Kim
198e71b7053SJung-uk Kim=head2 Issuer Alternative Name.
199e71b7053SJung-uk Kim
200e71b7053SJung-uk KimThe issuer alternative name option supports all the literal options of
201e71b7053SJung-uk Kimsubject alternative name. It does B<not> support the email:copy option because
202e71b7053SJung-uk Kimthat would not make sense. It does support an additional issuer:copy option
203e71b7053SJung-uk Kimthat will copy all the subject alternative name values from the issuer
204e71b7053SJung-uk Kimcertificate (if possible).
205e71b7053SJung-uk Kim
206e71b7053SJung-uk KimExample:
207e71b7053SJung-uk Kim
208e71b7053SJung-uk Kim issuerAltName = issuer:copy
209e71b7053SJung-uk Kim
210e71b7053SJung-uk Kim
211e71b7053SJung-uk Kim=head2 Authority Info Access.
212e71b7053SJung-uk Kim
213e71b7053SJung-uk KimThe authority information access extension gives details about how to access
214e71b7053SJung-uk Kimcertain information relating to the CA. Its syntax is accessOID;location
215e71b7053SJung-uk Kimwhere I<location> has the same syntax as subject alternative name (except
216e71b7053SJung-uk Kimthat email:copy is not supported). accessOID can be any valid OID but only
217e71b7053SJung-uk Kimcertain values are meaningful, for example OCSP and caIssuers.
218e71b7053SJung-uk Kim
219e71b7053SJung-uk KimExample:
220e71b7053SJung-uk Kim
221e71b7053SJung-uk Kim authorityInfoAccess = OCSP;URI:http://ocsp.my.host/
222e71b7053SJung-uk Kim authorityInfoAccess = caIssuers;URI:http://my.ca/ca.html
223e71b7053SJung-uk Kim
224e71b7053SJung-uk Kim
225e71b7053SJung-uk Kim=head2 CRL distribution points
226e71b7053SJung-uk Kim
227e71b7053SJung-uk KimThis is a multi-valued extension whose options can be either in name:value pair
228e71b7053SJung-uk Kimusing the same form as subject alternative name or a single value representing
229e71b7053SJung-uk Kima section name containing all the distribution point fields.
230e71b7053SJung-uk Kim
231e71b7053SJung-uk KimFor a name:value pair a new DistributionPoint with the fullName field set to
232e71b7053SJung-uk Kimthe given value both the cRLissuer and reasons fields are omitted in this case.
233e71b7053SJung-uk Kim
234e71b7053SJung-uk KimIn the single option case the section indicated contains values for each
235e71b7053SJung-uk Kimfield. In this section:
236e71b7053SJung-uk Kim
237e71b7053SJung-uk KimIf the name is "fullname" the value field should contain the full name
238e71b7053SJung-uk Kimof the distribution point in the same format as subject alternative name.
239e71b7053SJung-uk Kim
240e71b7053SJung-uk KimIf the name is "relativename" then the value field should contain a section
241e71b7053SJung-uk Kimname whose contents represent a DN fragment to be placed in this field.
242e71b7053SJung-uk Kim
243e71b7053SJung-uk KimThe name "CRLIssuer" if present should contain a value for this field in
244e71b7053SJung-uk Kimsubject alternative name format.
245e71b7053SJung-uk Kim
246e71b7053SJung-uk KimIf the name is "reasons" the value field should consist of a comma
247e71b7053SJung-uk Kimseparated field containing the reasons. Valid reasons are: "keyCompromise",
248e71b7053SJung-uk Kim"CACompromise", "affiliationChanged", "superseded", "cessationOfOperation",
249e71b7053SJung-uk Kim"certificateHold", "privilegeWithdrawn" and "AACompromise".
250e71b7053SJung-uk Kim
251e71b7053SJung-uk Kim
252e71b7053SJung-uk KimSimple examples:
253e71b7053SJung-uk Kim
254e71b7053SJung-uk Kim crlDistributionPoints=URI:http://myhost.com/myca.crl
255e71b7053SJung-uk Kim crlDistributionPoints=URI:http://my.com/my.crl,URI:http://oth.com/my.crl
256e71b7053SJung-uk Kim
257e71b7053SJung-uk KimFull distribution point example:
258e71b7053SJung-uk Kim
259e71b7053SJung-uk Kim crlDistributionPoints=crldp1_section
260e71b7053SJung-uk Kim
261e71b7053SJung-uk Kim [crldp1_section]
262e71b7053SJung-uk Kim
263e71b7053SJung-uk Kim fullname=URI:http://myhost.com/myca.crl
264e71b7053SJung-uk Kim CRLissuer=dirName:issuer_sect
265e71b7053SJung-uk Kim reasons=keyCompromise, CACompromise
266e71b7053SJung-uk Kim
267e71b7053SJung-uk Kim [issuer_sect]
268e71b7053SJung-uk Kim C=UK
269e71b7053SJung-uk Kim O=Organisation
270e71b7053SJung-uk Kim CN=Some Name
271e71b7053SJung-uk Kim
272e71b7053SJung-uk Kim=head2 Issuing Distribution Point
273e71b7053SJung-uk Kim
274e71b7053SJung-uk KimThis extension should only appear in CRLs. It is a multi valued extension
275e71b7053SJung-uk Kimwhose syntax is similar to the "section" pointed to by the CRL distribution
276e71b7053SJung-uk Kimpoints extension with a few differences.
277e71b7053SJung-uk Kim
278e71b7053SJung-uk KimThe names "reasons" and "CRLissuer" are not recognized.
279e71b7053SJung-uk Kim
280e71b7053SJung-uk KimThe name "onlysomereasons" is accepted which sets this field. The value is
281e71b7053SJung-uk Kimin the same format as the CRL distribution point "reasons" field.
282e71b7053SJung-uk Kim
283e71b7053SJung-uk KimThe names "onlyuser", "onlyCA", "onlyAA" and "indirectCRL" are also accepted
284e71b7053SJung-uk Kimthe values should be a boolean value (TRUE or FALSE) to indicate the value of
285e71b7053SJung-uk Kimthe corresponding field.
286e71b7053SJung-uk Kim
287e71b7053SJung-uk KimExample:
288e71b7053SJung-uk Kim
289e71b7053SJung-uk Kim issuingDistributionPoint=critical, @idp_section
290e71b7053SJung-uk Kim
291e71b7053SJung-uk Kim [idp_section]
292e71b7053SJung-uk Kim
293e71b7053SJung-uk Kim fullname=URI:http://myhost.com/myca.crl
294e71b7053SJung-uk Kim indirectCRL=TRUE
295e71b7053SJung-uk Kim onlysomereasons=keyCompromise, CACompromise
296e71b7053SJung-uk Kim
297e71b7053SJung-uk Kim [issuer_sect]
298e71b7053SJung-uk Kim C=UK
299e71b7053SJung-uk Kim O=Organisation
300e71b7053SJung-uk Kim CN=Some Name
301e71b7053SJung-uk Kim
302e71b7053SJung-uk Kim
303e71b7053SJung-uk Kim=head2 Certificate Policies.
304e71b7053SJung-uk Kim
305e71b7053SJung-uk KimThis is a I<raw> extension. All the fields of this extension can be set by
306e71b7053SJung-uk Kimusing the appropriate syntax.
307e71b7053SJung-uk Kim
308e71b7053SJung-uk KimIf you follow the PKIX recommendations and just using one OID then you just
309e71b7053SJung-uk Kiminclude the value of that OID. Multiple OIDs can be set separated by commas,
310e71b7053SJung-uk Kimfor example:
311e71b7053SJung-uk Kim
312e71b7053SJung-uk Kim certificatePolicies= 1.2.4.5, 1.1.3.4
313e71b7053SJung-uk Kim
314e71b7053SJung-uk KimIf you wish to include qualifiers then the policy OID and qualifiers need to
315e71b7053SJung-uk Kimbe specified in a separate section: this is done by using the @section syntax
316e71b7053SJung-uk Kiminstead of a literal OID value.
317e71b7053SJung-uk Kim
318e71b7053SJung-uk KimThe section referred to must include the policy OID using the name
319e71b7053SJung-uk KimpolicyIdentifier, cPSuri qualifiers can be included using the syntax:
320e71b7053SJung-uk Kim
321e71b7053SJung-uk Kim CPS.nnn=value
322e71b7053SJung-uk Kim
323e71b7053SJung-uk KimuserNotice qualifiers can be set using the syntax:
324e71b7053SJung-uk Kim
325e71b7053SJung-uk Kim userNotice.nnn=@notice
326e71b7053SJung-uk Kim
327e71b7053SJung-uk KimThe value of the userNotice qualifier is specified in the relevant section.
328e71b7053SJung-uk KimThis section can include explicitText, organization and noticeNumbers
329e71b7053SJung-uk Kimoptions. explicitText and organization are text strings, noticeNumbers is a
330e71b7053SJung-uk Kimcomma separated list of numbers. The organization and noticeNumbers options
331e71b7053SJung-uk Kim(if included) must BOTH be present. If you use the userNotice option with IE5
332e71b7053SJung-uk Kimthen you need the 'ia5org' option at the top level to modify the encoding:
333e71b7053SJung-uk Kimotherwise it will not be interpreted properly.
334e71b7053SJung-uk Kim
335e71b7053SJung-uk KimExample:
336e71b7053SJung-uk Kim
337e71b7053SJung-uk Kim certificatePolicies=ia5org,1.2.3.4,1.5.6.7.8,@polsect
338e71b7053SJung-uk Kim
339e71b7053SJung-uk Kim [polsect]
340e71b7053SJung-uk Kim
341e71b7053SJung-uk Kim policyIdentifier = 1.3.5.8
342e71b7053SJung-uk Kim CPS.1="http://my.host.name/"
343e71b7053SJung-uk Kim CPS.2="http://my.your.name/"
344e71b7053SJung-uk Kim userNotice.1=@notice
345e71b7053SJung-uk Kim
346e71b7053SJung-uk Kim [notice]
347e71b7053SJung-uk Kim
348e71b7053SJung-uk Kim explicitText="Explicit Text Here"
349e71b7053SJung-uk Kim organization="Organisation Name"
350e71b7053SJung-uk Kim noticeNumbers=1,2,3,4
351e71b7053SJung-uk Kim
352e71b7053SJung-uk KimThe B<ia5org> option changes the type of the I<organization> field. In RFC2459
353e71b7053SJung-uk Kimit can only be of type DisplayText. In RFC3280 IA5String is also permissible.
354e71b7053SJung-uk KimSome software (for example some versions of MSIE) may require ia5org.
355e71b7053SJung-uk Kim
356e71b7053SJung-uk KimASN1 type of explicitText can be specified by prepending B<UTF8>,
357e71b7053SJung-uk KimB<BMP> or B<VISIBLE> prefix followed by colon. For example:
358e71b7053SJung-uk Kim
359e71b7053SJung-uk Kim [notice]
360e71b7053SJung-uk Kim explicitText="UTF8:Explicit Text Here"
361e71b7053SJung-uk Kim
362e71b7053SJung-uk Kim=head2 Policy Constraints
363e71b7053SJung-uk Kim
364e71b7053SJung-uk KimThis is a multi-valued extension which consisting of the names
365e71b7053SJung-uk KimB<requireExplicitPolicy> or B<inhibitPolicyMapping> and a non negative integer
366e71b7053SJung-uk Kimvalue. At least one component must be present.
367e71b7053SJung-uk Kim
368e71b7053SJung-uk KimExample:
369e71b7053SJung-uk Kim
370e71b7053SJung-uk Kim policyConstraints = requireExplicitPolicy:3
371e71b7053SJung-uk Kim
372e71b7053SJung-uk Kim
373e71b7053SJung-uk Kim=head2 Inhibit Any Policy
374e71b7053SJung-uk Kim
375e71b7053SJung-uk KimThis is a string extension whose value must be a non negative integer.
376e71b7053SJung-uk Kim
377e71b7053SJung-uk KimExample:
378e71b7053SJung-uk Kim
379e71b7053SJung-uk Kim inhibitAnyPolicy = 2
380e71b7053SJung-uk Kim
381e71b7053SJung-uk Kim
382e71b7053SJung-uk Kim=head2 Name Constraints
383e71b7053SJung-uk Kim
384e71b7053SJung-uk KimThe name constraints extension is a multi-valued extension. The name should
385e71b7053SJung-uk Kimbegin with the word B<permitted> or B<excluded> followed by a B<;>. The rest of
386e71b7053SJung-uk Kimthe name and the value follows the syntax of subjectAltName except email:copy
387e71b7053SJung-uk Kimis not supported and the B<IP> form should consist of an IP addresses and
388e71b7053SJung-uk Kimsubnet mask separated by a B</>.
389e71b7053SJung-uk Kim
390e71b7053SJung-uk KimExamples:
391e71b7053SJung-uk Kim
392e71b7053SJung-uk Kim nameConstraints=permitted;IP:192.168.0.0/255.255.0.0
393e71b7053SJung-uk Kim
394e71b7053SJung-uk Kim nameConstraints=permitted;email:.somedomain.com
395e71b7053SJung-uk Kim
396e71b7053SJung-uk Kim nameConstraints=excluded;email:.com
397e71b7053SJung-uk Kim
398e71b7053SJung-uk Kim
399e71b7053SJung-uk Kim=head2 OCSP No Check
400e71b7053SJung-uk Kim
401e71b7053SJung-uk KimThe OCSP No Check extension is a string extension but its value is ignored.
402e71b7053SJung-uk Kim
403e71b7053SJung-uk KimExample:
404e71b7053SJung-uk Kim
405e71b7053SJung-uk Kim noCheck = ignored
406e71b7053SJung-uk Kim
407e71b7053SJung-uk Kim
408e71b7053SJung-uk Kim=head2 TLS Feature (aka Must Staple)
409e71b7053SJung-uk Kim
410e71b7053SJung-uk KimThis is a multi-valued extension consisting of a list of TLS extension
411e71b7053SJung-uk Kimidentifiers. Each identifier may be a number (0..65535) or a supported name.
412e71b7053SJung-uk KimWhen a TLS client sends a listed extension, the TLS server is expected to
413e71b7053SJung-uk Kiminclude that extension in its reply.
414e71b7053SJung-uk Kim
415e71b7053SJung-uk KimThe supported names are: B<status_request> and B<status_request_v2>.
416e71b7053SJung-uk Kim
417e71b7053SJung-uk KimExample:
418e71b7053SJung-uk Kim
419e71b7053SJung-uk Kim tlsfeature = status_request
420e71b7053SJung-uk Kim
421e71b7053SJung-uk Kim
422e71b7053SJung-uk Kim=head1 DEPRECATED EXTENSIONS
423e71b7053SJung-uk Kim
424e71b7053SJung-uk KimThe following extensions are non standard, Netscape specific and largely
425e71b7053SJung-uk Kimobsolete. Their use in new applications is discouraged.
426e71b7053SJung-uk Kim
427e71b7053SJung-uk Kim=head2 Netscape String extensions.
428e71b7053SJung-uk Kim
429e71b7053SJung-uk KimNetscape Comment (B<nsComment>) is a string extension containing a comment
430e71b7053SJung-uk Kimwhich will be displayed when the certificate is viewed in some browsers.
431e71b7053SJung-uk Kim
432e71b7053SJung-uk KimExample:
433e71b7053SJung-uk Kim
434e71b7053SJung-uk Kim nsComment = "Some Random Comment"
435e71b7053SJung-uk Kim
436e71b7053SJung-uk KimOther supported extensions in this category are: B<nsBaseUrl>,
437e71b7053SJung-uk KimB<nsRevocationUrl>, B<nsCaRevocationUrl>, B<nsRenewalUrl>, B<nsCaPolicyUrl>
438e71b7053SJung-uk Kimand B<nsSslServerName>.
439e71b7053SJung-uk Kim
440e71b7053SJung-uk Kim
441e71b7053SJung-uk Kim=head2 Netscape Certificate Type
442e71b7053SJung-uk Kim
443e71b7053SJung-uk KimThis is a multi-valued extensions which consists of a list of flags to be
444e71b7053SJung-uk Kimincluded. It was used to indicate the purposes for which a certificate could
445e71b7053SJung-uk Kimbe used. The basicConstraints, keyUsage and extended key usage extensions are
446e71b7053SJung-uk Kimnow used instead.
447e71b7053SJung-uk Kim
448e71b7053SJung-uk KimAcceptable values for nsCertType are: B<client>, B<server>, B<email>,
449e71b7053SJung-uk KimB<objsign>, B<reserved>, B<sslCA>, B<emailCA>, B<objCA>.
450e71b7053SJung-uk Kim
451e71b7053SJung-uk Kim
452e71b7053SJung-uk Kim=head1 ARBITRARY EXTENSIONS
453e71b7053SJung-uk Kim
454e71b7053SJung-uk KimIf an extension is not supported by the OpenSSL code then it must be encoded
455e71b7053SJung-uk Kimusing the arbitrary extension format. It is also possible to use the arbitrary
456e71b7053SJung-uk Kimformat for supported extensions. Extreme care should be taken to ensure that
457e71b7053SJung-uk Kimthe data is formatted correctly for the given extension type.
458e71b7053SJung-uk Kim
459e71b7053SJung-uk KimThere are two ways to encode arbitrary extensions.
460e71b7053SJung-uk Kim
461e71b7053SJung-uk KimThe first way is to use the word ASN1 followed by the extension content
462e71b7053SJung-uk Kimusing the same syntax as L<ASN1_generate_nconf(3)>.
463e71b7053SJung-uk KimFor example:
464e71b7053SJung-uk Kim
465e71b7053SJung-uk Kim 1.2.3.4=critical,ASN1:UTF8String:Some random data
466e71b7053SJung-uk Kim
467e71b7053SJung-uk Kim 1.2.3.4=ASN1:SEQUENCE:seq_sect
468e71b7053SJung-uk Kim
469e71b7053SJung-uk Kim [seq_sect]
470e71b7053SJung-uk Kim
471e71b7053SJung-uk Kim field1 = UTF8:field1
472e71b7053SJung-uk Kim field2 = UTF8:field2
473e71b7053SJung-uk Kim
474e71b7053SJung-uk KimIt is also possible to use the word DER to include the raw encoded data in any
475e71b7053SJung-uk Kimextension.
476e71b7053SJung-uk Kim
477e71b7053SJung-uk Kim 1.2.3.4=critical,DER:01:02:03:04
478e71b7053SJung-uk Kim 1.2.3.4=DER:01020304
479e71b7053SJung-uk Kim
480e71b7053SJung-uk KimThe value following DER is a hex dump of the DER encoding of the extension
481e71b7053SJung-uk KimAny extension can be placed in this form to override the default behaviour.
482e71b7053SJung-uk KimFor example:
483e71b7053SJung-uk Kim
484e71b7053SJung-uk Kim basicConstraints=critical,DER:00:01:02:03
485e71b7053SJung-uk Kim
486da327cd2SJung-uk Kim=head1 WARNINGS
487e71b7053SJung-uk Kim
488e71b7053SJung-uk KimThere is no guarantee that a specific implementation will process a given
489e71b7053SJung-uk Kimextension. It may therefore be sometimes possible to use certificates for
490e71b7053SJung-uk Kimpurposes prohibited by their extensions because a specific application does
491e71b7053SJung-uk Kimnot recognize or honour the values of the relevant extensions.
492e71b7053SJung-uk Kim
493e71b7053SJung-uk KimThe DER and ASN1 options should be used with caution. It is possible to create
494e71b7053SJung-uk Kimtotally invalid extensions if they are not used carefully.
495e71b7053SJung-uk Kim
496e71b7053SJung-uk Kim=head1 NOTES
497e71b7053SJung-uk Kim
498e71b7053SJung-uk KimIf an extension is multi-value and a field value must contain a comma the long
499e71b7053SJung-uk Kimform must be used otherwise the comma would be misinterpreted as a field
500e71b7053SJung-uk Kimseparator. For example:
501e71b7053SJung-uk Kim
502e71b7053SJung-uk Kim subjectAltName=URI:ldap://somehost.com/CN=foo,OU=bar
503e71b7053SJung-uk Kim
504e71b7053SJung-uk Kimwill produce an error but the equivalent form:
505e71b7053SJung-uk Kim
506e71b7053SJung-uk Kim subjectAltName=@subject_alt_section
507e71b7053SJung-uk Kim
508e71b7053SJung-uk Kim [subject_alt_section]
509e71b7053SJung-uk Kim subjectAltName=URI:ldap://somehost.com/CN=foo,OU=bar
510e71b7053SJung-uk Kim
511e71b7053SJung-uk Kimis valid.
512e71b7053SJung-uk Kim
513e71b7053SJung-uk KimDue to the behaviour of the OpenSSL B<conf> library the same field name
514e71b7053SJung-uk Kimcan only occur once in a section. This means that:
515e71b7053SJung-uk Kim
516e71b7053SJung-uk Kim subjectAltName=@alt_section
517e71b7053SJung-uk Kim
518e71b7053SJung-uk Kim [alt_section]
519e71b7053SJung-uk Kim
520e71b7053SJung-uk Kim email=steve@here
521e71b7053SJung-uk Kim email=steve@there
522e71b7053SJung-uk Kim
523e71b7053SJung-uk Kimwill only recognize the last value. This can be worked around by using the form:
524e71b7053SJung-uk Kim
525e71b7053SJung-uk Kim [alt_section]
526e71b7053SJung-uk Kim
527e71b7053SJung-uk Kim email.1=steve@here
528e71b7053SJung-uk Kim email.2=steve@there
529e71b7053SJung-uk Kim
530e71b7053SJung-uk Kim=head1 SEE ALSO
531e71b7053SJung-uk Kim
532e71b7053SJung-uk KimL<req(1)>, L<ca(1)>, L<x509(1)>,
533e71b7053SJung-uk KimL<ASN1_generate_nconf(3)>
534e71b7053SJung-uk Kim
535e71b7053SJung-uk Kim=head1 COPYRIGHT
536e71b7053SJung-uk Kim
537*58f35182SJung-uk KimCopyright 2004-2020 The OpenSSL Project Authors. All Rights Reserved.
538e71b7053SJung-uk Kim
539e71b7053SJung-uk KimLicensed under the OpenSSL license (the "License").  You may not use
540e71b7053SJung-uk Kimthis file except in compliance with the License.  You can obtain a copy
541e71b7053SJung-uk Kimin the file LICENSE in the source distribution or at
542e71b7053SJung-uk KimL<https://www.openssl.org/source/license.html>.
543e71b7053SJung-uk Kim
544e71b7053SJung-uk Kim=cut
545