xref: /freebsd/crypto/openssl/doc/man5/x509v3_config.pod (revision 6f1af0d7d2af54b339b5212434cd6d4fda628d80)
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
9b077aed3SPierre ProncherySeveral OpenSSL commands can add extensions to a certificate or
10b077aed3SPierre Proncherycertificate request based on the contents of a configuration file
11b077aed3SPierre Proncheryand CLI options such as B<-addext>.
12b077aed3SPierre ProncheryThe syntax of configuration files is described in L<config(5)>.
13b077aed3SPierre ProncheryThe commands typically have an option to specify the name of the configuration
14b077aed3SPierre Proncheryfile, and a section within that file; see the documentation of the
15b077aed3SPierre Proncheryindividual command for details.
16e71b7053SJung-uk Kim
17b077aed3SPierre ProncheryThis page uses B<extensions> as the name of the section, when needed
18b077aed3SPierre Proncheryin examples.
19e71b7053SJung-uk Kim
20b077aed3SPierre ProncheryEach entry in the extension section takes the form:
21e71b7053SJung-uk Kim
22b077aed3SPierre Pronchery name = [critical, ]value(s)
23e71b7053SJung-uk Kim
24b077aed3SPierre ProncheryIf B<critical> is present then the extension will be marked as critical.
25e71b7053SJung-uk Kim
26b077aed3SPierre ProncheryIf multiple entries are processed for the same extension name,
27b077aed3SPierre Proncherylater entries override earlier ones with the same name.
28b077aed3SPierre Pronchery
29b077aed3SPierre ProncheryThe format of B<values> depends on the value of B<name>, many have a
30b077aed3SPierre Proncherytype-value pairing where the type and value are separated by a colon.
31b077aed3SPierre ProncheryThere are four main types of extension:
32b077aed3SPierre Pronchery
33b077aed3SPierre Pronchery string
34b077aed3SPierre Pronchery multi-valued
35b077aed3SPierre Pronchery raw
36b077aed3SPierre Pronchery arbitrary
37b077aed3SPierre Pronchery
38b077aed3SPierre ProncheryEach is described in the following paragraphs.
39e71b7053SJung-uk Kim
40e71b7053SJung-uk KimString extensions simply have a string which contains either the value itself
41e71b7053SJung-uk Kimor how it is obtained.
42e71b7053SJung-uk Kim
43e71b7053SJung-uk KimMulti-valued extensions have a short form and a long form. The short form
44b077aed3SPierre Proncheryis a comma-separated list of names and values:
45e71b7053SJung-uk Kim
46e71b7053SJung-uk Kim basicConstraints = critical, CA:true, pathlen:1
47e71b7053SJung-uk Kim
48e71b7053SJung-uk KimThe long form allows the values to be placed in a separate section:
49e71b7053SJung-uk Kim
50b077aed3SPierre Pronchery [extensions]
51b077aed3SPierre Pronchery basicConstraints = critical, @basic_constraints
52e71b7053SJung-uk Kim
53b077aed3SPierre Pronchery [basic_constraints]
54e71b7053SJung-uk Kim CA = true
55e71b7053SJung-uk Kim pathlen = 1
56e71b7053SJung-uk Kim
57e71b7053SJung-uk KimBoth forms are equivalent.
58e71b7053SJung-uk Kim
59b077aed3SPierre ProncheryIf an extension is multi-value and a field value must contain a comma the long
60b077aed3SPierre Proncheryform must be used otherwise the comma would be misinterpreted as a field
61b077aed3SPierre Proncheryseparator. For example:
62e71b7053SJung-uk Kim
63b077aed3SPierre Pronchery subjectAltName = URI:ldap://somehost.com/CN=foo,OU=bar
64b077aed3SPierre Pronchery
65b077aed3SPierre Proncherywill produce an error but the equivalent form:
66b077aed3SPierre Pronchery
67b077aed3SPierre Pronchery [extensions]
68b077aed3SPierre Pronchery subjectAltName = @subject_alt_section
69b077aed3SPierre Pronchery
70b077aed3SPierre Pronchery [subject_alt_section]
71b077aed3SPierre Pronchery subjectAltName = URI:ldap://somehost.com/CN=foo,OU=bar
72b077aed3SPierre Pronchery
73b077aed3SPierre Proncheryis valid.
74b077aed3SPierre Pronchery
75b077aed3SPierre ProncheryOpenSSL does not support multiple occurrences of the same field within a
76b077aed3SPierre Proncherysection. In this example:
77b077aed3SPierre Pronchery
78b077aed3SPierre Pronchery [extensions]
79b077aed3SPierre Pronchery subjectAltName = @alt_section
80b077aed3SPierre Pronchery
81b077aed3SPierre Pronchery [alt_section]
82b077aed3SPierre Pronchery email = steve@example.com
83b077aed3SPierre Pronchery email = steve@example.org
84b077aed3SPierre Pronchery
85b077aed3SPierre Proncherywill only recognize the last value.  To specify multiple values append a
86b077aed3SPierre Proncherynumeric identifier, as shown here:
87b077aed3SPierre Pronchery
88b077aed3SPierre Pronchery [extensions]
89b077aed3SPierre Pronchery subjectAltName = @alt_section
90b077aed3SPierre Pronchery
91b077aed3SPierre Pronchery [alt_section]
92b077aed3SPierre Pronchery email.1 = steve@example.com
93b077aed3SPierre Pronchery email.2 = steve@example.org
94b077aed3SPierre Pronchery
95b077aed3SPierre ProncheryThe syntax of raw extensions is defined by the source code that parses
96*6f1af0d7SPierre Proncherythe extension but should be documented.
97b077aed3SPierre ProncherySee L</Certificate Policies> for an example of a raw extension.
98b077aed3SPierre Pronchery
99b077aed3SPierre ProncheryIf an extension type is unsupported, then the I<arbitrary> extension syntax
100b077aed3SPierre Proncherymust be used, see the L</ARBITRARY EXTENSIONS> section for more details.
101e71b7053SJung-uk Kim
102e71b7053SJung-uk Kim=head1 STANDARD EXTENSIONS
103e71b7053SJung-uk Kim
104b077aed3SPierre ProncheryThe following sections describe the syntax of each supported extension.
105b077aed3SPierre ProncheryThey do not define the semantics of the extension.
106e71b7053SJung-uk Kim
107b077aed3SPierre Pronchery=head2 Basic Constraints
108e71b7053SJung-uk Kim
109b077aed3SPierre ProncheryThis is a multi-valued extension which indicates whether a certificate is
110b077aed3SPierre Proncherya CA certificate. The first value is B<CA> followed by B<TRUE> or
11158f35182SJung-uk KimB<FALSE>. If B<CA> is B<TRUE> then an optional B<pathlen> name followed by a
11258f35182SJung-uk Kimnonnegative value can be included.
113e71b7053SJung-uk Kim
114e71b7053SJung-uk KimFor example:
115e71b7053SJung-uk Kim
116e71b7053SJung-uk Kim basicConstraints = CA:TRUE
117e71b7053SJung-uk Kim
118e71b7053SJung-uk Kim basicConstraints = CA:FALSE
119e71b7053SJung-uk Kim
120b077aed3SPierre Pronchery basicConstraints = critical, CA:TRUE, pathlen:1
121e71b7053SJung-uk Kim
122b077aed3SPierre ProncheryA CA certificate I<must> include the B<basicConstraints> name with the B<CA>
123b077aed3SPierre Proncheryparameter set to B<TRUE>. An end-user certificate must either have B<CA:FALSE>
124b077aed3SPierre Proncheryor omit the extension entirely.
125b077aed3SPierre ProncheryThe B<pathlen> parameter specifies the maximum number of CAs that can appear
126b077aed3SPierre Proncherybelow this one in a chain. A B<pathlen> of zero means the CA cannot sign
127b077aed3SPierre Proncheryany sub-CA's, and can only sign end-entity certificates.
128e71b7053SJung-uk Kim
129b077aed3SPierre Pronchery=head2 Key Usage
130e71b7053SJung-uk Kim
131b077aed3SPierre ProncheryKey usage is a multi-valued extension consisting of a list of names of
132b077aed3SPierre Proncherythe permitted key usages.  The defined values are: C<digitalSignature>,
133b077aed3SPierre ProncheryC<nonRepudiation>, C<keyEncipherment>, C<dataEncipherment>, C<keyAgreement>,
134b077aed3SPierre ProncheryC<keyCertSign>, C<cRLSign>, C<encipherOnly>, and C<decipherOnly>.
135e71b7053SJung-uk Kim
136e71b7053SJung-uk KimExamples:
137e71b7053SJung-uk Kim
138e71b7053SJung-uk Kim keyUsage = digitalSignature, nonRepudiation
139e71b7053SJung-uk Kim
140e71b7053SJung-uk Kim keyUsage = critical, keyCertSign
141e71b7053SJung-uk Kim
142b077aed3SPierre Pronchery=head2 Extended Key Usage
143e71b7053SJung-uk Kim
144b077aed3SPierre ProncheryThis extension consists of a list of values indicating purposes for which
145b077aed3SPierre Proncherythe certificate public key can be used.
146b077aed3SPierre ProncheryEach value can be either a short text name or an OID.
147b077aed3SPierre ProncheryThe following text names, and their intended meaning, are known:
148e71b7053SJung-uk Kim
149b077aed3SPierre Pronchery Value                  Meaning according to RFC 5280 etc.
150b077aed3SPierre Pronchery -----                  ----------------------------------
151b077aed3SPierre Pronchery serverAuth             SSL/TLS WWW Server Authentication
152b077aed3SPierre Pronchery clientAuth             SSL/TLS WWW Client Authentication
153b077aed3SPierre Pronchery codeSigning            Code Signing
154b077aed3SPierre Pronchery emailProtection        E-mail Protection (S/MIME)
155e71b7053SJung-uk Kim timeStamping           Trusted Timestamping
156e71b7053SJung-uk Kim OCSPSigning            OCSP Signing
157e71b7053SJung-uk Kim ipsecIKE               ipsec Internet Key Exchange
158e71b7053SJung-uk Kim msCodeInd              Microsoft Individual Code Signing (authenticode)
159e71b7053SJung-uk Kim msCodeCom              Microsoft Commercial Code Signing (authenticode)
160e71b7053SJung-uk Kim msCTLSign              Microsoft Trust List Signing
161e71b7053SJung-uk Kim msEFS                  Microsoft Encrypted File System
162e71b7053SJung-uk Kim
163b077aed3SPierre ProncheryWhile IETF RFC 5280 says that B<id-kp-serverAuth> and B<id-kp-clientAuth>
164b077aed3SPierre Proncheryare only for WWW use, in practice they are used for all kinds of TLS clients
165b077aed3SPierre Proncheryand servers, and this is what OpenSSL assumes as well.
166b077aed3SPierre Pronchery
167e71b7053SJung-uk KimExamples:
168e71b7053SJung-uk Kim
169e71b7053SJung-uk Kim extendedKeyUsage = critical, codeSigning, 1.2.3.4
170b077aed3SPierre Pronchery
171e71b7053SJung-uk Kim extendedKeyUsage = serverAuth, clientAuth
172e71b7053SJung-uk Kim
173b077aed3SPierre Pronchery=head2 Subject Key Identifier
174e71b7053SJung-uk Kim
175b077aed3SPierre ProncheryThe SKID extension specification has a value with three choices.
176b077aed3SPierre ProncheryIf the value is the word B<none> then no SKID extension will be included.
177b077aed3SPierre ProncheryIf the value is the word B<hash>, or by default for the B<x509>, B<req>, and
178b077aed3SPierre ProncheryB<ca> apps, the process specified in RFC 5280 section 4.2.1.2. (1) is followed:
179b077aed3SPierre ProncheryThe keyIdentifier is composed of the 160-bit SHA-1 hash of the value of the BIT
180b077aed3SPierre ProncherySTRING subjectPublicKey (excluding the tag, length, and number of unused bits).
181e71b7053SJung-uk Kim
182b077aed3SPierre ProncheryOtherwise, the value must be a hex string (possibly with C<:> separating bytes)
183b077aed3SPierre Proncheryto output directly, however, this is strongly discouraged.
184e71b7053SJung-uk Kim
185e71b7053SJung-uk KimExample:
186e71b7053SJung-uk Kim
187e71b7053SJung-uk Kim subjectKeyIdentifier = hash
188e71b7053SJung-uk Kim
189b077aed3SPierre Pronchery=head2 Authority Key Identifier
190e71b7053SJung-uk Kim
191b077aed3SPierre ProncheryThe AKID extension specification may have the value B<none>
192b077aed3SPierre Proncheryindicating that no AKID shall be included.
193b077aed3SPierre ProncheryOtherwise it may have the value B<keyid> or B<issuer>
194b077aed3SPierre Proncheryor both of them, separated by C<,>.
195b077aed3SPierre ProncheryEither or both can have the option B<always>,
196b077aed3SPierre Proncheryindicated by putting a colon C<:> between the value and this option.
197b077aed3SPierre ProncheryFor self-signed certificates the AKID is suppressed unless B<always> is present.
198b077aed3SPierre ProncheryBy default the B<x509>, B<req>, and B<ca> apps behave as if
199b077aed3SPierre Pronchery"none" was given for self-signed certificates and "keyid, issuer" otherwise.
200e71b7053SJung-uk Kim
201b077aed3SPierre ProncheryIf B<keyid> is present, an attempt is made to
202b077aed3SPierre Proncherycopy the subject key identifier (SKID) from the issuer certificate except if
203b077aed3SPierre Proncherythe issuer certificate is the same as the current one and it is not self-signed.
204b077aed3SPierre ProncheryThe hash of the public key related to the signing key is taken as fallback
205b077aed3SPierre Proncheryif the issuer certificate is the same as the current certificate.
206b077aed3SPierre ProncheryIf B<always> is present but no value can be obtained, an error is returned.
207e71b7053SJung-uk Kim
208b077aed3SPierre ProncheryIf B<issuer> is present, and in addition it has the option B<always> specified
209b077aed3SPierre Proncheryor B<keyid> is not present,
210b077aed3SPierre Proncherythen the issuer DN and serial number are copied from the issuer certificate.
211e71b7053SJung-uk Kim
212e71b7053SJung-uk KimExamples:
213e71b7053SJung-uk Kim
214b077aed3SPierre Pronchery authorityKeyIdentifier = keyid, issuer
215b077aed3SPierre Pronchery
216b077aed3SPierre Pronchery authorityKeyIdentifier = keyid, issuer:always
217b077aed3SPierre Pronchery
218b077aed3SPierre Pronchery=head2 Subject Alternative Name
219b077aed3SPierre Pronchery
220b077aed3SPierre ProncheryThis is a multi-valued extension that supports several types of name
221b077aed3SPierre Proncheryidentifier, including
222b077aed3SPierre ProncheryB<email> (an email address),
223b077aed3SPierre ProncheryB<URI> (a uniform resource indicator),
224b077aed3SPierre ProncheryB<DNS> (a DNS domain name),
225b077aed3SPierre ProncheryB<RID> (a registered ID: OBJECT IDENTIFIER),
226b077aed3SPierre ProncheryB<IP> (an IP address),
227b077aed3SPierre ProncheryB<dirName> (a distinguished name),
228b077aed3SPierre Proncheryand B<otherName>.
229b077aed3SPierre ProncheryThe syntax of each is described in the following paragraphs.
230b077aed3SPierre Pronchery
231b077aed3SPierre ProncheryThe B<email> option has two special values.
232b077aed3SPierre ProncheryC<copy> will automatically include any email addresses
233b077aed3SPierre Proncherycontained in the certificate subject name in the extension.
234b077aed3SPierre ProncheryC<move> will automatically move any email addresses
235b077aed3SPierre Proncheryfrom the certificate subject name to the extension.
236b077aed3SPierre Pronchery
237b077aed3SPierre ProncheryThe IP address used in the B<IP> option can be in either IPv4 or IPv6 format.
238b077aed3SPierre Pronchery
239b077aed3SPierre ProncheryThe value of B<dirName> is specifies the configuration section containing
240b077aed3SPierre Proncherythe distinguished name to use, as a set of name-value pairs.
241b077aed3SPierre ProncheryMulti-valued AVAs can be formed by prefacing the name with a B<+> character.
242b077aed3SPierre Pronchery
243b077aed3SPierre ProncheryThe value of B<otherName> can include arbitrary data associated with an OID;
244b077aed3SPierre Proncherythe value should be the OID followed by a semicolon and the content in specified
245b077aed3SPierre Proncheryusing the syntax in L<ASN1_generate_nconf(3)>.
246b077aed3SPierre Pronchery
247b077aed3SPierre ProncheryExamples:
248b077aed3SPierre Pronchery
249b077aed3SPierre Pronchery subjectAltName = email:copy, email:my@example.com, URI:http://my.example.com/
250b077aed3SPierre Pronchery
251e71b7053SJung-uk Kim subjectAltName = IP:192.168.7.1
252b077aed3SPierre Pronchery
253e71b7053SJung-uk Kim subjectAltName = IP:13::17
254b077aed3SPierre Pronchery
255b077aed3SPierre Pronchery subjectAltName = email:my@example.com, RID:1.2.3.4
256b077aed3SPierre Pronchery
257e71b7053SJung-uk Kim subjectAltName = otherName:1.2.3.4;UTF8:some other identifier
258e71b7053SJung-uk Kim
259b077aed3SPierre Pronchery [extensions]
260e71b7053SJung-uk Kim subjectAltName = dirName:dir_sect
261e71b7053SJung-uk Kim
262e71b7053SJung-uk Kim [dir_sect]
263e71b7053SJung-uk Kim C = UK
264e71b7053SJung-uk Kim O = My Organization
265e71b7053SJung-uk Kim OU = My Unit
266e71b7053SJung-uk Kim CN = My Name
267e71b7053SJung-uk Kim
268b077aed3SPierre ProncheryNon-ASCII Email Address conforming the syntax defined in Section 3.3 of RFC 6531
269b077aed3SPierre Proncheryare provided as otherName.SmtpUTF8Mailbox. According to RFC 8398, the email
270b077aed3SPierre Proncheryaddress should be provided as UTF8String. To enforce the valid representation in
271b077aed3SPierre Proncherythe certificate, the SmtpUTF8Mailbox should be provided as follows
272e71b7053SJung-uk Kim
273b077aed3SPierre Pronchery subjectAltName=@alts
274b077aed3SPierre Pronchery [alts]
275b077aed3SPierre Pronchery otherName = 1.3.6.1.5.5.7.8.9;FORMAT:UTF8,UTF8String:nonasciiname.example.com
276e71b7053SJung-uk Kim
277b077aed3SPierre Pronchery=head2 Issuer Alternative Name
278b077aed3SPierre Pronchery
279b077aed3SPierre ProncheryThis extension supports most of the options of subject alternative name;
280b077aed3SPierre Proncheryit does not support B<email:copy>.
281b077aed3SPierre ProncheryIt also adds B<issuer:copy> as an allowed value, which copies any subject
282b077aed3SPierre Proncheryalternative names from the issuer certificate, if possible.
283e71b7053SJung-uk Kim
284e71b7053SJung-uk KimExample:
285e71b7053SJung-uk Kim
286e71b7053SJung-uk Kim issuerAltName = issuer:copy
287e71b7053SJung-uk Kim
288b077aed3SPierre Pronchery=head2 Authority Info Access
289e71b7053SJung-uk Kim
290b077aed3SPierre ProncheryThis extension gives details about how to retrieve information that
291b077aed3SPierre Proncheryrelated to the certificate that the CA makes available. The syntax is
292b077aed3SPierre ProncheryB<access_id;location>, where B<access_id> is an object identifier
293b077aed3SPierre Pronchery(although only a few values are well-known) and B<location> has the same
294b077aed3SPierre Proncherysyntax as subject alternative name (except that B<email:copy> is not supported).
295e71b7053SJung-uk Kim
296b077aed3SPierre ProncheryPossible values for access_id include B<OCSP> (OCSP responder),
297b077aed3SPierre ProncheryB<caIssuers> (CA Issuers),
298b077aed3SPierre ProncheryB<ad_timestamping> (AD Time Stamping),
299b077aed3SPierre ProncheryB<AD_DVCS> (ad dvcs),
300b077aed3SPierre ProncheryB<caRepository> (CA Repository).
301e71b7053SJung-uk Kim
302b077aed3SPierre ProncheryExamples:
303e71b7053SJung-uk Kim
304b077aed3SPierre Pronchery authorityInfoAccess = OCSP;URI:http://ocsp.example.com/,caIssuers;URI:http://myca.example.com/ca.cer
305e71b7053SJung-uk Kim
306b077aed3SPierre Pronchery authorityInfoAccess = OCSP;URI:http://ocsp.example.com/
307e71b7053SJung-uk Kim
308e71b7053SJung-uk Kim=head2 CRL distribution points
309e71b7053SJung-uk Kim
310b077aed3SPierre ProncheryThis is a multi-valued extension whose values can be either a name-value
311b077aed3SPierre Proncherypair using the same form as subject alternative name or a single value
312b077aed3SPierre Proncheryspecifying the section name containing all the distribution point values.
313e71b7053SJung-uk Kim
314b077aed3SPierre ProncheryWhen a name-value pair is used, a DistributionPoint extension will
315b077aed3SPierre Proncherybe set with the given value as the fullName field as the distributionPoint
316b077aed3SPierre Proncheryvalue, and the reasons and cRLIssuer fields will be omitted.
317e71b7053SJung-uk Kim
318b077aed3SPierre ProncheryWhen a single option is used, the value specifies the section, and that
319b077aed3SPierre Proncherysection can have the following items:
320e71b7053SJung-uk Kim
321b077aed3SPierre Pronchery=over 4
322e71b7053SJung-uk Kim
323b077aed3SPierre Pronchery=item fullname
324e71b7053SJung-uk Kim
325b077aed3SPierre ProncheryThe full name of the distribution point, in the same format as the subject
326b077aed3SPierre Proncheryalternative name.
327e71b7053SJung-uk Kim
328b077aed3SPierre Pronchery=item relativename
329e71b7053SJung-uk Kim
330b077aed3SPierre ProncheryThe value is taken as a distinguished name fragment that is set as the
331b077aed3SPierre Proncheryvalue of the nameRelativeToCRLIssuer field.
332b077aed3SPierre Pronchery
333b077aed3SPierre Pronchery=item CRLIssuer
334b077aed3SPierre Pronchery
335b077aed3SPierre ProncheryThe value must in the same format as the subject alternative name.
336b077aed3SPierre Pronchery
337b077aed3SPierre Pronchery=item reasons
338b077aed3SPierre Pronchery
339b077aed3SPierre ProncheryA multi-value field that contains the reasons for revocation. The recognized
340b077aed3SPierre Proncheryvalues are: C<keyCompromise>, C<CACompromise>, C<affiliationChanged>,
341b077aed3SPierre ProncheryC<superseded>, C<cessationOfOperation>, C<certificateHold>,
342b077aed3SPierre ProncheryC<privilegeWithdrawn>, and C<AACompromise>.
343b077aed3SPierre Pronchery
344b077aed3SPierre Pronchery=back
345b077aed3SPierre Pronchery
346b077aed3SPierre ProncheryOnly one of B<fullname> or B<relativename> should be specified.
347e71b7053SJung-uk Kim
348e71b7053SJung-uk KimSimple examples:
349e71b7053SJung-uk Kim
350b077aed3SPierre Pronchery crlDistributionPoints = URI:http://example.com/myca.crl
351b077aed3SPierre Pronchery
352b077aed3SPierre Pronchery crlDistributionPoints = URI:http://example.com/myca.crl, URI:http://example.org/my.crl
353e71b7053SJung-uk Kim
354e71b7053SJung-uk KimFull distribution point example:
355e71b7053SJung-uk Kim
356b077aed3SPierre Pronchery [extensions]
357e71b7053SJung-uk Kim crlDistributionPoints = crldp1_section
358e71b7053SJung-uk Kim
359e71b7053SJung-uk Kim [crldp1_section]
360b077aed3SPierre Pronchery fullname = URI:http://example.com/myca.crl
361e71b7053SJung-uk Kim CRLissuer = dirName:issuer_sect
362e71b7053SJung-uk Kim reasons = keyCompromise, CACompromise
363e71b7053SJung-uk Kim
364e71b7053SJung-uk Kim [issuer_sect]
365e71b7053SJung-uk Kim C = UK
366e71b7053SJung-uk Kim O = Organisation
367e71b7053SJung-uk Kim CN = Some Name
368e71b7053SJung-uk Kim
369e71b7053SJung-uk Kim=head2 Issuing Distribution Point
370e71b7053SJung-uk Kim
371b077aed3SPierre ProncheryThis extension should only appear in CRLs. It is a multi-valued extension
372e71b7053SJung-uk Kimwhose syntax is similar to the "section" pointed to by the CRL distribution
373b077aed3SPierre Proncherypoints extension. The following names have meaning:
374e71b7053SJung-uk Kim
375b077aed3SPierre Pronchery=over 4
376e71b7053SJung-uk Kim
377b077aed3SPierre Pronchery=item fullname
378e71b7053SJung-uk Kim
379b077aed3SPierre ProncheryThe full name of the distribution point, in the same format as the subject
380b077aed3SPierre Proncheryalternative name.
381b077aed3SPierre Pronchery
382b077aed3SPierre Pronchery=item relativename
383b077aed3SPierre Pronchery
384b077aed3SPierre ProncheryThe value is taken as a distinguished name fragment that is set as the
385b077aed3SPierre Proncheryvalue of the nameRelativeToCRLIssuer field.
386b077aed3SPierre Pronchery
387b077aed3SPierre Pronchery=item onlysomereasons
388b077aed3SPierre Pronchery
389b077aed3SPierre ProncheryA multi-value field that contains the reasons for revocation. The recognized
390b077aed3SPierre Proncheryvalues are: C<keyCompromise>, C<CACompromise>, C<affiliationChanged>,
391b077aed3SPierre ProncheryC<superseded>, C<cessationOfOperation>, C<certificateHold>,
392b077aed3SPierre ProncheryC<privilegeWithdrawn>, and C<AACompromise>.
393b077aed3SPierre Pronchery
394b077aed3SPierre Pronchery=item onlyuser, onlyCA, onlyAA, indirectCRL
395b077aed3SPierre Pronchery
396b077aed3SPierre ProncheryThe value for each of these names is a boolean.
397b077aed3SPierre Pronchery
398b077aed3SPierre Pronchery=back
399e71b7053SJung-uk Kim
400e71b7053SJung-uk KimExample:
401e71b7053SJung-uk Kim
402b077aed3SPierre Pronchery [extensions]
403e71b7053SJung-uk Kim issuingDistributionPoint = critical, @idp_section
404e71b7053SJung-uk Kim
405e71b7053SJung-uk Kim [idp_section]
406b077aed3SPierre Pronchery fullname = URI:http://example.com/myca.crl
407e71b7053SJung-uk Kim indirectCRL = TRUE
408e71b7053SJung-uk Kim onlysomereasons = keyCompromise, CACompromise
409e71b7053SJung-uk Kim
410b077aed3SPierre Pronchery=head2 Certificate Policies
411e71b7053SJung-uk Kim
412b077aed3SPierre ProncheryThis is a I<raw> extension that supports all of the defined fields of the
413b077aed3SPierre Proncherycertificate extension.
414e71b7053SJung-uk Kim
415b077aed3SPierre ProncheryPolicies without qualifiers are specified by giving the OID.
416b077aed3SPierre ProncheryMultiple policies are comma-separated. For example:
417e71b7053SJung-uk Kim
418e71b7053SJung-uk Kim certificatePolicies = 1.2.4.5, 1.1.3.4
419e71b7053SJung-uk Kim
420b077aed3SPierre ProncheryTo include policy qualifiers, use the "@section" syntax to point to a
421b077aed3SPierre Proncherysection that specifies all the information.
422e71b7053SJung-uk Kim
423e71b7053SJung-uk KimThe section referred to must include the policy OID using the name
424b077aed3SPierre ProncheryB<policyIdentifier>. cPSuri qualifiers can be included using the syntax:
425e71b7053SJung-uk Kim
426e71b7053SJung-uk Kim CPS.nnn = value
427e71b7053SJung-uk Kim
428b077aed3SPierre Proncherywhere C<nnn> is a number.
429b077aed3SPierre Pronchery
430e71b7053SJung-uk KimuserNotice qualifiers can be set using the syntax:
431e71b7053SJung-uk Kim
432e71b7053SJung-uk Kim userNotice.nnn = @notice
433e71b7053SJung-uk Kim
434e71b7053SJung-uk KimThe value of the userNotice qualifier is specified in the relevant section.
435b077aed3SPierre ProncheryThis section can include B<explicitText>, B<organization>, and B<noticeNumbers>
436e71b7053SJung-uk Kimoptions. explicitText and organization are text strings, noticeNumbers is a
437e71b7053SJung-uk Kimcomma separated list of numbers. The organization and noticeNumbers options
438b077aed3SPierre Pronchery(if included) must BOTH be present. Some software might require
439b077aed3SPierre Proncherythe B<ia5org> option at the top level; this changes the encoding from
440b077aed3SPierre ProncheryDisplaytext to IA5String.
441e71b7053SJung-uk Kim
442e71b7053SJung-uk KimExample:
443e71b7053SJung-uk Kim
444b077aed3SPierre Pronchery [extensions]
445e71b7053SJung-uk Kim certificatePolicies = ia5org, 1.2.3.4, 1.5.6.7.8, @polsect
446e71b7053SJung-uk Kim
447e71b7053SJung-uk Kim [polsect]
448e71b7053SJung-uk Kim policyIdentifier = 1.3.5.8
449b077aed3SPierre Pronchery CPS.1 = "http://my.host.example.com/"
450b077aed3SPierre Pronchery CPS.2 = "http://my.your.example.com/"
451e71b7053SJung-uk Kim userNotice.1 = @notice
452e71b7053SJung-uk Kim
453e71b7053SJung-uk Kim [notice]
454e71b7053SJung-uk Kim explicitText = "Explicit Text Here"
455e71b7053SJung-uk Kim organization = "Organisation Name"
456e71b7053SJung-uk Kim noticeNumbers = 1, 2, 3, 4
457e71b7053SJung-uk Kim
458b077aed3SPierre ProncheryThe character encoding of explicitText can be specified by prefixing the
459b077aed3SPierre Proncheryvalue with B<UTF8>, B<BMP>, or B<VISIBLE> followed by colon. For example:
460e71b7053SJung-uk Kim
461e71b7053SJung-uk Kim [notice]
462e71b7053SJung-uk Kim explicitText = "UTF8:Explicit Text Here"
463e71b7053SJung-uk Kim
464e71b7053SJung-uk Kim=head2 Policy Constraints
465e71b7053SJung-uk Kim
466e71b7053SJung-uk KimThis is a multi-valued extension which consisting of the names
467e71b7053SJung-uk KimB<requireExplicitPolicy> or B<inhibitPolicyMapping> and a non negative integer
468e71b7053SJung-uk Kimvalue. At least one component must be present.
469e71b7053SJung-uk Kim
470e71b7053SJung-uk KimExample:
471e71b7053SJung-uk Kim
472e71b7053SJung-uk Kim policyConstraints = requireExplicitPolicy:3
473e71b7053SJung-uk Kim
474e71b7053SJung-uk Kim=head2 Inhibit Any Policy
475e71b7053SJung-uk Kim
476e71b7053SJung-uk KimThis is a string extension whose value must be a non negative integer.
477e71b7053SJung-uk Kim
478e71b7053SJung-uk KimExample:
479e71b7053SJung-uk Kim
480e71b7053SJung-uk Kim inhibitAnyPolicy = 2
481e71b7053SJung-uk Kim
482e71b7053SJung-uk Kim=head2 Name Constraints
483e71b7053SJung-uk Kim
484b077aed3SPierre ProncheryThis is a multi-valued extension. The name should
485e71b7053SJung-uk Kimbegin with the word B<permitted> or B<excluded> followed by a B<;>. The rest of
486b077aed3SPierre Proncherythe name and the value follows the syntax of subjectAltName except
487b077aed3SPierre ProncheryB<email:copy>
488e71b7053SJung-uk Kimis not supported and the B<IP> form should consist of an IP addresses and
489e71b7053SJung-uk Kimsubnet mask separated by a B</>.
490e71b7053SJung-uk Kim
491e71b7053SJung-uk KimExamples:
492e71b7053SJung-uk Kim
493e71b7053SJung-uk Kim nameConstraints = permitted;IP:192.168.0.0/255.255.0.0
494e71b7053SJung-uk Kim
495b077aed3SPierre Pronchery nameConstraints = permitted;email:.example.com
496e71b7053SJung-uk Kim
497e71b7053SJung-uk Kim nameConstraints = excluded;email:.com
498e71b7053SJung-uk Kim
499e71b7053SJung-uk Kim=head2 OCSP No Check
500e71b7053SJung-uk Kim
501b077aed3SPierre ProncheryThis is a string extension. It is parsed, but ignored.
502e71b7053SJung-uk Kim
503e71b7053SJung-uk KimExample:
504e71b7053SJung-uk Kim
505e71b7053SJung-uk Kim noCheck = ignored
506e71b7053SJung-uk Kim
507e71b7053SJung-uk Kim=head2 TLS Feature (aka Must Staple)
508e71b7053SJung-uk Kim
509e71b7053SJung-uk KimThis is a multi-valued extension consisting of a list of TLS extension
510e71b7053SJung-uk Kimidentifiers. Each identifier may be a number (0..65535) or a supported name.
511e71b7053SJung-uk KimWhen a TLS client sends a listed extension, the TLS server is expected to
512e71b7053SJung-uk Kiminclude that extension in its reply.
513e71b7053SJung-uk Kim
514e71b7053SJung-uk KimThe supported names are: B<status_request> and B<status_request_v2>.
515e71b7053SJung-uk Kim
516e71b7053SJung-uk KimExample:
517e71b7053SJung-uk Kim
518e71b7053SJung-uk Kim tlsfeature = status_request
519e71b7053SJung-uk Kim
520e71b7053SJung-uk Kim=head1 DEPRECATED EXTENSIONS
521e71b7053SJung-uk Kim
522e71b7053SJung-uk KimThe following extensions are non standard, Netscape specific and largely
523e71b7053SJung-uk Kimobsolete. Their use in new applications is discouraged.
524e71b7053SJung-uk Kim
525b077aed3SPierre Pronchery=head2 Netscape String extensions
526e71b7053SJung-uk Kim
527e71b7053SJung-uk KimNetscape Comment (B<nsComment>) is a string extension containing a comment
528e71b7053SJung-uk Kimwhich will be displayed when the certificate is viewed in some browsers.
529b077aed3SPierre ProncheryOther extensions of this type are: B<nsBaseUrl>,
530e71b7053SJung-uk KimB<nsRevocationUrl>, B<nsCaRevocationUrl>, B<nsRenewalUrl>, B<nsCaPolicyUrl>
531e71b7053SJung-uk Kimand B<nsSslServerName>.
532e71b7053SJung-uk Kim
533e71b7053SJung-uk Kim=head2 Netscape Certificate Type
534e71b7053SJung-uk Kim
535e71b7053SJung-uk KimThis is a multi-valued extensions which consists of a list of flags to be
536e71b7053SJung-uk Kimincluded. It was used to indicate the purposes for which a certificate could
537e71b7053SJung-uk Kimbe used. The basicConstraints, keyUsage and extended key usage extensions are
538e71b7053SJung-uk Kimnow used instead.
539e71b7053SJung-uk Kim
540e71b7053SJung-uk KimAcceptable values for nsCertType are: B<client>, B<server>, B<email>,
541e71b7053SJung-uk KimB<objsign>, B<reserved>, B<sslCA>, B<emailCA>, B<objCA>.
542e71b7053SJung-uk Kim
543e71b7053SJung-uk Kim=head1 ARBITRARY EXTENSIONS
544e71b7053SJung-uk Kim
545e71b7053SJung-uk KimIf an extension is not supported by the OpenSSL code then it must be encoded
546e71b7053SJung-uk Kimusing the arbitrary extension format. It is also possible to use the arbitrary
547e71b7053SJung-uk Kimformat for supported extensions. Extreme care should be taken to ensure that
548e71b7053SJung-uk Kimthe data is formatted correctly for the given extension type.
549e71b7053SJung-uk Kim
550e71b7053SJung-uk KimThere are two ways to encode arbitrary extensions.
551e71b7053SJung-uk Kim
552e71b7053SJung-uk KimThe first way is to use the word ASN1 followed by the extension content
553e71b7053SJung-uk Kimusing the same syntax as L<ASN1_generate_nconf(3)>.
554e71b7053SJung-uk KimFor example:
555e71b7053SJung-uk Kim
556b077aed3SPierre Pronchery [extensions]
557e71b7053SJung-uk Kim 1.2.3.4 = critical, ASN1:UTF8String:Some random data
558b077aed3SPierre Pronchery 1.2.3.4.1 = ASN1:SEQUENCE:seq_sect
559e71b7053SJung-uk Kim
560e71b7053SJung-uk Kim [seq_sect]
561e71b7053SJung-uk Kim field1 = UTF8:field1
562e71b7053SJung-uk Kim field2 = UTF8:field2
563e71b7053SJung-uk Kim
564e71b7053SJung-uk KimIt is also possible to use the word DER to include the raw encoded data in any
565e71b7053SJung-uk Kimextension.
566e71b7053SJung-uk Kim
567e71b7053SJung-uk Kim 1.2.3.4 = critical, DER:01:02:03:04
568b077aed3SPierre Pronchery 1.2.3.4.1 = DER:01020304
569e71b7053SJung-uk Kim
570e71b7053SJung-uk KimThe value following DER is a hex dump of the DER encoding of the extension
571e71b7053SJung-uk KimAny extension can be placed in this form to override the default behaviour.
572e71b7053SJung-uk KimFor example:
573e71b7053SJung-uk Kim
574e71b7053SJung-uk Kim basicConstraints = critical, DER:00:01:02:03
575e71b7053SJung-uk Kim
576da327cd2SJung-uk Kim=head1 WARNINGS
577e71b7053SJung-uk Kim
578e71b7053SJung-uk KimThere is no guarantee that a specific implementation will process a given
579e71b7053SJung-uk Kimextension. It may therefore be sometimes possible to use certificates for
580e71b7053SJung-uk Kimpurposes prohibited by their extensions because a specific application does
581e71b7053SJung-uk Kimnot recognize or honour the values of the relevant extensions.
582e71b7053SJung-uk Kim
583e71b7053SJung-uk KimThe DER and ASN1 options should be used with caution. It is possible to create
584b077aed3SPierre Proncheryinvalid extensions if they are not used carefully.
585e71b7053SJung-uk Kim
586e71b7053SJung-uk Kim=head1 SEE ALSO
587e71b7053SJung-uk Kim
588b077aed3SPierre ProncheryL<openssl-req(1)>, L<openssl-ca(1)>, L<openssl-x509(1)>,
589e71b7053SJung-uk KimL<ASN1_generate_nconf(3)>
590e71b7053SJung-uk Kim
591e71b7053SJung-uk Kim=head1 COPYRIGHT
592e71b7053SJung-uk Kim
593*6f1af0d7SPierre ProncheryCopyright 2004-2023 The OpenSSL Project Authors. All Rights Reserved.
594e71b7053SJung-uk Kim
595b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License").  You may not use
596e71b7053SJung-uk Kimthis file except in compliance with the License.  You can obtain a copy
597e71b7053SJung-uk Kimin the file LICENSE in the source distribution or at
598e71b7053SJung-uk KimL<https://www.openssl.org/source/license.html>.
599e71b7053SJung-uk Kim
600e71b7053SJung-uk Kim=cut
601