]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - secure/usr.bin/openssl/man/x509v3_config.1
MFC: r337791
[FreeBSD/FreeBSD.git] / secure / usr.bin / openssl / man / x509v3_config.1
1 .\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35)
2 .\"
3 .\" Standard preamble:
4 .\" ========================================================================
5 .de Sp \" Vertical space (when we can't use .PP)
6 .if t .sp .5v
7 .if n .sp
8 ..
9 .de Vb \" Begin verbatim text
10 .ft CW
11 .nf
12 .ne \\$1
13 ..
14 .de Ve \" End verbatim text
15 .ft R
16 .fi
17 ..
18 .\" Set up some character translations and predefined strings.  \*(-- will
19 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
20 .\" double quote, and \*(R" will give a right double quote.  \*(C+ will
21 .\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
22 .\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
23 .\" nothing in troff, for use with C<>.
24 .tr \(*W-
25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
26 .ie n \{\
27 .    ds -- \(*W-
28 .    ds PI pi
29 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
30 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
31 .    ds L" ""
32 .    ds R" ""
33 .    ds C` ""
34 .    ds C' ""
35 'br\}
36 .el\{\
37 .    ds -- \|\(em\|
38 .    ds PI \(*p
39 .    ds L" ``
40 .    ds R" ''
41 .    ds C`
42 .    ds C'
43 'br\}
44 .\"
45 .\" Escape single quotes in literal strings from groff's Unicode transform.
46 .ie \n(.g .ds Aq \(aq
47 .el       .ds Aq '
48 .\"
49 .\" If the F register is >0, we'll generate index entries on stderr for
50 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
51 .\" entries marked with X<> in POD.  Of course, you'll have to process the
52 .\" output yourself in some meaningful fashion.
53 .\"
54 .\" Avoid warning from groff about undefined register 'F'.
55 .de IX
56 ..
57 .if !\nF .nr F 0
58 .if \nF>0 \{\
59 .    de IX
60 .    tm Index:\\$1\t\\n%\t"\\$2"
61 ..
62 .    if !\nF==2 \{\
63 .        nr % 0
64 .        nr F 2
65 .    \}
66 .\}
67 .\"
68 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
70 .    \" fudge factors for nroff and troff
71 .if n \{\
72 .    ds #H 0
73 .    ds #V .8m
74 .    ds #F .3m
75 .    ds #[ \f1
76 .    ds #] \fP
77 .\}
78 .if t \{\
79 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
80 .    ds #V .6m
81 .    ds #F 0
82 .    ds #[ \&
83 .    ds #] \&
84 .\}
85 .    \" simple accents for nroff and troff
86 .if n \{\
87 .    ds ' \&
88 .    ds ` \&
89 .    ds ^ \&
90 .    ds , \&
91 .    ds ~ ~
92 .    ds /
93 .\}
94 .if t \{\
95 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
96 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
97 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
98 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
99 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
100 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
101 .\}
102 .    \" troff and (daisy-wheel) nroff accents
103 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
104 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
105 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
106 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
107 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
108 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
109 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
110 .ds ae a\h'-(\w'a'u*4/10)'e
111 .ds Ae A\h'-(\w'A'u*4/10)'E
112 .    \" corrections for vroff
113 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
114 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
115 .    \" for low resolution devices (crt and lpr)
116 .if \n(.H>23 .if \n(.V>19 \
117 \{\
118 .    ds : e
119 .    ds 8 ss
120 .    ds o a
121 .    ds d- d\h'-1'\(ga
122 .    ds D- D\h'-1'\(hy
123 .    ds th \o'bp'
124 .    ds Th \o'LP'
125 .    ds ae ae
126 .    ds Ae AE
127 .\}
128 .rm #[ #] #H #V #F C
129 .\" ========================================================================
130 .\"
131 .IX Title "X509V3_CONFIG 1"
132 .TH X509V3_CONFIG 1 "2018-08-14" "1.0.2p" "OpenSSL"
133 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
134 .\" way too many mistakes in technical documents.
135 .if n .ad l
136 .nh
137 .SH "NAME"
138 x509v3_config \- X509 V3 certificate extension configuration format
139 .SH "DESCRIPTION"
140 .IX Header "DESCRIPTION"
141 Several of the OpenSSL utilities can add extensions to a certificate or
142 certificate request based on the contents of a configuration file.
143 .PP
144 Typically the application will contain an option to point to an extension
145 section. Each line of the extension section takes the form:
146 .PP
147 .Vb 1
148 \& extension_name=[critical,] extension_options
149 .Ve
150 .PP
151 If \fBcritical\fR is present then the extension will be critical.
152 .PP
153 The format of \fBextension_options\fR depends on the value of \fBextension_name\fR.
154 .PP
155 There are four main types of extension: \fIstring\fR extensions, \fImulti-valued\fR
156 extensions, \fIraw\fR and \fIarbitrary\fR extensions.
157 .PP
158 String extensions simply have a string which contains either the value itself
159 or how it is obtained.
160 .PP
161 For example:
162 .PP
163 .Vb 1
164 \& nsComment="This is a Comment"
165 .Ve
166 .PP
167 Multi-valued extensions have a short form and a long form. The short form
168 is a list of names and values:
169 .PP
170 .Vb 1
171 \& basicConstraints=critical,CA:true,pathlen:1
172 .Ve
173 .PP
174 The long form allows the values to be placed in a separate section:
175 .PP
176 .Vb 1
177 \& basicConstraints=critical,@bs_section
178 \&
179 \& [bs_section]
180 \&
181 \& CA=true
182 \& pathlen=1
183 .Ve
184 .PP
185 Both forms are equivalent.
186 .PP
187 The syntax of raw extensions is governed by the extension code: it can
188 for example contain data in multiple sections. The correct syntax to
189 use is defined by the extension code itself: check out the certificate
190 policies extension for an example.
191 .PP
192 If an extension type is unsupported then the \fIarbitrary\fR extension syntax
193 must be used, see the \s-1ARBITRARY EXTENSIONS\s0 section for more details.
194 .SH "STANDARD EXTENSIONS"
195 .IX Header "STANDARD EXTENSIONS"
196 The following sections describe each supported extension in detail.
197 .SS "Basic Constraints."
198 .IX Subsection "Basic Constraints."
199 This is a multi valued extension which indicates whether a certificate is
200 a \s-1CA\s0 certificate. The first (mandatory) name is \fB\s-1CA\s0\fR followed by \fB\s-1TRUE\s0\fR or
201 \&\fB\s-1FALSE\s0\fR. If \fB\s-1CA\s0\fR is \fB\s-1TRUE\s0\fR then an optional \fBpathlen\fR name followed by an
202 non-negative value can be included.
203 .PP
204 For example:
205 .PP
206 .Vb 1
207 \& basicConstraints=CA:TRUE
208 \&
209 \& basicConstraints=CA:FALSE
210 \&
211 \& basicConstraints=critical,CA:TRUE, pathlen:0
212 .Ve
213 .PP
214 A \s-1CA\s0 certificate \fBmust\fR include the basicConstraints value with the \s-1CA\s0 field
215 set to \s-1TRUE.\s0 An end user certificate must either set \s-1CA\s0 to \s-1FALSE\s0 or exclude the
216 extension entirely. Some software may require the inclusion of basicConstraints
217 with \s-1CA\s0 set to \s-1FALSE\s0 for end entity certificates.
218 .PP
219 The pathlen parameter indicates the maximum number of CAs that can appear
220 below this one in a chain. So if you have a \s-1CA\s0 with a pathlen of zero it can
221 only be used to sign end user certificates and not further CAs.
222 .SS "Key Usage."
223 .IX Subsection "Key Usage."
224 Key usage is a multi valued extension consisting of a list of names of the
225 permitted key usages.
226 .PP
227 The supporte names are: digitalSignature, nonRepudiation, keyEncipherment,
228 dataEncipherment, keyAgreement, keyCertSign, cRLSign, encipherOnly
229 and decipherOnly.
230 .PP
231 Examples:
232 .PP
233 .Vb 1
234 \& keyUsage=digitalSignature, nonRepudiation
235 \&
236 \& keyUsage=critical, keyCertSign
237 .Ve
238 .SS "Extended Key Usage."
239 .IX Subsection "Extended Key Usage."
240 This extensions consists of a list of usages indicating purposes for which
241 the certificate public key can be used for,
242 .PP
243 These can either be object short names or the dotted numerical form of OIDs.
244 While any \s-1OID\s0 can be used only certain values make sense. In particular the
245 following \s-1PKIX, NS\s0 and \s-1MS\s0 values are meaningful:
246 .PP
247 .Vb 10
248 \& Value                  Meaning
249 \& \-\-\-\-\-                  \-\-\-\-\-\-\-
250 \& serverAuth             SSL/TLS Web Server Authentication.
251 \& clientAuth             SSL/TLS Web Client Authentication.
252 \& codeSigning            Code signing.
253 \& emailProtection        E\-mail Protection (S/MIME).
254 \& timeStamping           Trusted Timestamping
255 \& msCodeInd              Microsoft Individual Code Signing (authenticode)
256 \& msCodeCom              Microsoft Commercial Code Signing (authenticode)
257 \& msCTLSign              Microsoft Trust List Signing
258 \& msSGC                  Microsoft Server Gated Crypto
259 \& msEFS                  Microsoft Encrypted File System
260 \& nsSGC                  Netscape Server Gated Crypto
261 .Ve
262 .PP
263 Examples:
264 .PP
265 .Vb 2
266 \& extendedKeyUsage=critical,codeSigning,1.2.3.4
267 \& extendedKeyUsage=nsSGC,msSGC
268 .Ve
269 .SS "Subject Key Identifier."
270 .IX Subsection "Subject Key Identifier."
271 This is really a string extension and can take two possible values. Either
272 the word \fBhash\fR which will automatically follow the guidelines in \s-1RFC3280\s0
273 or a hex string giving the extension value to include. The use of the hex
274 string is strongly discouraged.
275 .PP
276 Example:
277 .PP
278 .Vb 1
279 \& subjectKeyIdentifier=hash
280 .Ve
281 .SS "Authority Key Identifier."
282 .IX Subsection "Authority Key Identifier."
283 The authority key identifier extension permits two options. keyid and issuer:
284 both can take the optional value \*(L"always\*(R".
285 .PP
286 If the keyid option is present an attempt is made to copy the subject key
287 identifier from the parent certificate. If the value \*(L"always\*(R" is present
288 then an error is returned if the option fails.
289 .PP
290 The issuer option copies the issuer and serial number from the issuer
291 certificate. This will only be done if the keyid option fails or
292 is not included unless the \*(L"always\*(R" flag will always include the value.
293 .PP
294 Example:
295 .PP
296 .Vb 1
297 \& authorityKeyIdentifier=keyid,issuer
298 .Ve
299 .SS "Subject Alternative Name."
300 .IX Subsection "Subject Alternative Name."
301 The subject alternative name extension allows various literal values to be
302 included in the configuration file. These include \fBemail\fR (an email address)
303 \&\fB\s-1URI\s0\fR a uniform resource indicator, \fB\s-1DNS\s0\fR (a \s-1DNS\s0 domain name), \fB\s-1RID\s0\fR (a
304 registered \s-1ID: OBJECT IDENTIFIER\s0), \fB\s-1IP\s0\fR (an \s-1IP\s0 address), \fBdirName\fR
305 (a distinguished name) and otherName.
306 .PP
307 The email option include a special 'copy' value. This will automatically
308 include and email addresses contained in the certificate subject name in
309 the extension.
310 .PP
311 The \s-1IP\s0 address used in the \fB\s-1IP\s0\fR options can be in either IPv4 or IPv6 format.
312 .PP
313 The value of \fBdirName\fR should point to a section containing the distinguished
314 name to use as a set of name value pairs. Multi values AVAs can be formed by
315 prefacing the name with a \fB+\fR character.
316 .PP
317 otherName can include arbitrary data associated with an \s-1OID:\s0 the value
318 should be the \s-1OID\s0 followed by a semicolon and the content in standard
319 \&\fIASN1_generate_nconf\fR\|(3) format.
320 .PP
321 Examples:
322 .PP
323 .Vb 5
324 \& subjectAltName=email:copy,email:my@other.address,URI:http://my.url.here/
325 \& subjectAltName=IP:192.168.7.1
326 \& subjectAltName=IP:13::17
327 \& subjectAltName=email:my@other.address,RID:1.2.3.4
328 \& subjectAltName=otherName:1.2.3.4;UTF8:some other identifier
329 \&
330 \& subjectAltName=dirName:dir_sect
331 \&
332 \& [dir_sect]
333 \& C=UK
334 \& O=My Organization
335 \& OU=My Unit
336 \& CN=My Name
337 .Ve
338 .SS "Issuer Alternative Name."
339 .IX Subsection "Issuer Alternative Name."
340 The issuer alternative name option supports all the literal options of
341 subject alternative name. It does \fBnot\fR support the email:copy option because
342 that would not make sense. It does support an additional issuer:copy option
343 that will copy all the subject alternative name values from the issuer 
344 certificate (if possible).
345 .PP
346 Example:
347 .PP
348 .Vb 1
349 \& issuserAltName = issuer:copy
350 .Ve
351 .SS "Authority Info Access."
352 .IX Subsection "Authority Info Access."
353 The authority information access extension gives details about how to access
354 certain information relating to the \s-1CA.\s0 Its syntax is accessOID;location
355 where \fIlocation\fR has the same syntax as subject alternative name (except
356 that email:copy is not supported). accessOID can be any valid \s-1OID\s0 but only
357 certain values are meaningful, for example \s-1OCSP\s0 and caIssuers.
358 .PP
359 Example:
360 .PP
361 .Vb 2
362 \& authorityInfoAccess = OCSP;URI:http://ocsp.my.host/
363 \& authorityInfoAccess = caIssuers;URI:http://my.ca/ca.html
364 .Ve
365 .SS "\s-1CRL\s0 distribution points."
366 .IX Subsection "CRL distribution points."
367 This is a multi-valued extension whose options can be either in name:value pair
368 using the same form as subject alternative name or a single value representing
369 a section name containing all the distribution point fields.
370 .PP
371 For a name:value pair a new DistributionPoint with the fullName field set to
372 the given value both the cRLissuer and reasons fields are omitted in this case.
373 .PP
374 In the single option case the section indicated contains values for each
375 field. In this section:
376 .PP
377 If the name is \*(L"fullname\*(R" the value field should contain the full name
378 of the distribution point in the same format as subject alternative name.
379 .PP
380 If the name is \*(L"relativename\*(R" then the value field should contain a section
381 name whose contents represent a \s-1DN\s0 fragment to be placed in this field.
382 .PP
383 The name \*(L"CRLIssuer\*(R" if present should contain a value for this field in
384 subject alternative name format.
385 .PP
386 If the name is \*(L"reasons\*(R" the value field should consist of a comma
387 separated field containing the reasons. Valid reasons are: \*(L"keyCompromise\*(R",
388 \&\*(L"CACompromise\*(R", \*(L"affiliationChanged\*(R", \*(L"superseded\*(R", \*(L"cessationOfOperation\*(R",
389 \&\*(L"certificateHold\*(R", \*(L"privilegeWithdrawn\*(R" and \*(L"AACompromise\*(R".
390 .PP
391 Simple examples:
392 .PP
393 .Vb 2
394 \& crlDistributionPoints=URI:http://myhost.com/myca.crl
395 \& crlDistributionPoints=URI:http://my.com/my.crl,URI:http://oth.com/my.crl
396 .Ve
397 .PP
398 Full distribution point example:
399 .PP
400 .Vb 1
401 \& crlDistributionPoints=crldp1_section
402 \&
403 \& [crldp1_section]
404 \&
405 \& fullname=URI:http://myhost.com/myca.crl
406 \& CRLissuer=dirName:issuer_sect
407 \& reasons=keyCompromise, CACompromise
408 \&
409 \& [issuer_sect]
410 \& C=UK
411 \& O=Organisation
412 \& CN=Some Name
413 .Ve
414 .SS "Issuing Distribution Point"
415 .IX Subsection "Issuing Distribution Point"
416 This extension should only appear in CRLs. It is a multi valued extension
417 whose syntax is similar to the \*(L"section\*(R" pointed to by the \s-1CRL\s0 distribution
418 points extension with a few differences.
419 .PP
420 The names \*(L"reasons\*(R" and \*(L"CRLissuer\*(R" are not recognized.
421 .PP
422 The name \*(L"onlysomereasons\*(R" is accepted which sets this field. The value is
423 in the same format as the \s-1CRL\s0 distribution point \*(L"reasons\*(R" field.
424 .PP
425 The names \*(L"onlyuser\*(R", \*(L"onlyCA\*(R", \*(L"onlyAA\*(R" and \*(L"indirectCRL\*(R" are also accepted
426 the values should be a boolean value (\s-1TRUE\s0 or \s-1FALSE\s0) to indicate the value of
427 the corresponding field.
428 .PP
429 Example:
430 .PP
431 .Vb 1
432 \& issuingDistributionPoint=critical, @idp_section
433 \&
434 \& [idp_section]
435 \&
436 \& fullname=URI:http://myhost.com/myca.crl
437 \& indirectCRL=TRUE
438 \& onlysomereasons=keyCompromise, CACompromise
439 \&
440 \& [issuer_sect]
441 \& C=UK
442 \& O=Organisation
443 \& CN=Some Name
444 .Ve
445 .SS "Certificate Policies."
446 .IX Subsection "Certificate Policies."
447 This is a \fIraw\fR extension. All the fields of this extension can be set by
448 using the appropriate syntax.
449 .PP
450 If you follow the \s-1PKIX\s0 recommendations and just using one \s-1OID\s0 then you just
451 include the value of that \s-1OID.\s0 Multiple OIDs can be set separated by commas,
452 for example:
453 .PP
454 .Vb 1
455 \& certificatePolicies= 1.2.4.5, 1.1.3.4
456 .Ve
457 .PP
458 If you wish to include qualifiers then the policy \s-1OID\s0 and qualifiers need to
459 be specified in a separate section: this is done by using the \f(CW@section\fR syntax
460 instead of a literal \s-1OID\s0 value.
461 .PP
462 The section referred to must include the policy \s-1OID\s0 using the name
463 policyIdentifier, cPSuri qualifiers can be included using the syntax:
464 .PP
465 .Vb 1
466 \& CPS.nnn=value
467 .Ve
468 .PP
469 userNotice qualifiers can be set using the syntax:
470 .PP
471 .Vb 1
472 \& userNotice.nnn=@notice
473 .Ve
474 .PP
475 The value of the userNotice qualifier is specified in the relevant section.
476 This section can include explicitText, organization and noticeNumbers
477 options. explicitText and organization are text strings, noticeNumbers is a
478 comma separated list of numbers. The organization and noticeNumbers options
479 (if included) must \s-1BOTH\s0 be present. If you use the userNotice option with \s-1IE5\s0
480 then you need the 'ia5org' option at the top level to modify the encoding:
481 otherwise it will not be interpreted properly.
482 .PP
483 Example:
484 .PP
485 .Vb 1
486 \& certificatePolicies=ia5org,1.2.3.4,1.5.6.7.8,@polsect
487 \&
488 \& [polsect]
489 \&
490 \& policyIdentifier = 1.3.5.8
491 \& CPS.1="http://my.host.name/"
492 \& CPS.2="http://my.your.name/"
493 \& userNotice.1=@notice
494 \&
495 \& [notice]
496 \&
497 \& explicitText="Explicit Text Here"
498 \& organization="Organisation Name"
499 \& noticeNumbers=1,2,3,4
500 .Ve
501 .PP
502 The \fBia5org\fR option changes the type of the \fIorganization\fR field. In \s-1RFC2459\s0
503 it can only be of type DisplayText. In \s-1RFC3280\s0 IA5Strring is also permissible.
504 Some software (for example some versions of \s-1MSIE\s0) may require ia5org.
505 .SS "Policy Constraints"
506 .IX Subsection "Policy Constraints"
507 This is a multi-valued extension which consisting of the names
508 \&\fBrequireExplicitPolicy\fR or \fBinhibitPolicyMapping\fR and a non negative intger
509 value. At least one component must be present.
510 .PP
511 Example:
512 .PP
513 .Vb 1
514 \& policyConstraints = requireExplicitPolicy:3
515 .Ve
516 .SS "Inhibit Any Policy"
517 .IX Subsection "Inhibit Any Policy"
518 This is a string extension whose value must be a non negative integer.
519 .PP
520 Example:
521 .PP
522 .Vb 1
523 \& inhibitAnyPolicy = 2
524 .Ve
525 .SS "Name Constraints"
526 .IX Subsection "Name Constraints"
527 The name constraints extension is a multi-valued extension. The name should
528 begin with the word \fBpermitted\fR or \fBexcluded\fR followed by a \fB;\fR. The rest of
529 the name and the value follows the syntax of subjectAltName except email:copy
530 is not supported and the \fB\s-1IP\s0\fR form should consist of an \s-1IP\s0 addresses and 
531 subnet mask separated by a \fB/\fR.
532 .PP
533 Examples:
534 .PP
535 .Vb 1
536 \& nameConstraints=permitted;IP:192.168.0.0/255.255.0.0
537 \&
538 \& nameConstraints=permitted;email:.somedomain.com
539 \&
540 \& nameConstraints=excluded;email:.com
541 .Ve
542 .SS "\s-1OCSP\s0 No Check"
543 .IX Subsection "OCSP No Check"
544 The \s-1OCSP\s0 No Check extension is a string extension but its value is ignored.
545 .PP
546 Example:
547 .PP
548 .Vb 1
549 \& noCheck = ignored
550 .Ve
551 .SH "DEPRECATED EXTENSIONS"
552 .IX Header "DEPRECATED EXTENSIONS"
553 The following extensions are non standard, Netscape specific and largely
554 obsolete. Their use in new applications is discouraged.
555 .SS "Netscape String extensions."
556 .IX Subsection "Netscape String extensions."
557 Netscape Comment (\fBnsComment\fR) is a string extension containing a comment
558 which will be displayed when the certificate is viewed in some browsers.
559 .PP
560 Example:
561 .PP
562 .Vb 1
563 \& nsComment = "Some Random Comment"
564 .Ve
565 .PP
566 Other supported extensions in this category are: \fBnsBaseUrl\fR,
567 \&\fBnsRevocationUrl\fR, \fBnsCaRevocationUrl\fR, \fBnsRenewalUrl\fR, \fBnsCaPolicyUrl\fR
568 and \fBnsSslServerName\fR.
569 .SS "Netscape Certificate Type"
570 .IX Subsection "Netscape Certificate Type"
571 This is a multi-valued extensions which consists of a list of flags to be
572 included. It was used to indicate the purposes for which a certificate could
573 be used. The basicConstraints, keyUsage and extended key usage extensions are
574 now used instead.
575 .PP
576 Acceptable values for nsCertType are: \fBclient\fR, \fBserver\fR, \fBemail\fR,
577 \&\fBobjsign\fR, \fBreserved\fR, \fBsslCA\fR, \fBemailCA\fR, \fBobjCA\fR.
578 .SH "ARBITRARY EXTENSIONS"
579 .IX Header "ARBITRARY EXTENSIONS"
580 If an extension is not supported by the OpenSSL code then it must be encoded
581 using the arbitrary extension format. It is also possible to use the arbitrary
582 format for supported extensions. Extreme care should be taken to ensure that
583 the data is formatted correctly for the given extension type.
584 .PP
585 There are two ways to encode arbitrary extensions.
586 .PP
587 The first way is to use the word \s-1ASN1\s0 followed by the extension content
588 using the same syntax as \fIASN1_generate_nconf\fR\|(3).
589 For example:
590 .PP
591 .Vb 1
592 \& 1.2.3.4=critical,ASN1:UTF8String:Some random data
593 \&
594 \& 1.2.3.4=ASN1:SEQUENCE:seq_sect
595 \&
596 \& [seq_sect]
597 \&
598 \& field1 = UTF8:field1
599 \& field2 = UTF8:field2
600 .Ve
601 .PP
602 It is also possible to use the word \s-1DER\s0 to include the raw encoded data in any
603 extension.
604 .PP
605 .Vb 2
606 \& 1.2.3.4=critical,DER:01:02:03:04
607 \& 1.2.3.4=DER:01020304
608 .Ve
609 .PP
610 The value following \s-1DER\s0 is a hex dump of the \s-1DER\s0 encoding of the extension
611 Any extension can be placed in this form to override the default behaviour.
612 For example:
613 .PP
614 .Vb 1
615 \& basicConstraints=critical,DER:00:01:02:03
616 .Ve
617 .SH "WARNING"
618 .IX Header "WARNING"
619 There is no guarantee that a specific implementation will process a given
620 extension. It may therefore be sometimes possible to use certificates for
621 purposes prohibited by their extensions because a specific application does
622 not recognize or honour the values of the relevant extensions.
623 .PP
624 The \s-1DER\s0 and \s-1ASN1\s0 options should be used with caution. It is possible to create
625 totally invalid extensions if they are not used carefully.
626 .SH "NOTES"
627 .IX Header "NOTES"
628 If an extension is multi-value and a field value must contain a comma the long
629 form must be used otherwise the comma would be misinterpreted as a field
630 separator. For example:
631 .PP
632 .Vb 1
633 \& subjectAltName=URI:ldap://somehost.com/CN=foo,OU=bar
634 .Ve
635 .PP
636 will produce an error but the equivalent form:
637 .PP
638 .Vb 1
639 \& subjectAltName=@subject_alt_section
640 \&
641 \& [subject_alt_section]
642 \& subjectAltName=URI:ldap://somehost.com/CN=foo,OU=bar
643 .Ve
644 .PP
645 is valid.
646 .PP
647 Due to the behaviour of the OpenSSL \fBconf\fR library the same field name
648 can only occur once in a section. This means that:
649 .PP
650 .Vb 1
651 \& subjectAltName=@alt_section
652 \&
653 \& [alt_section]
654 \&
655 \& email=steve@here
656 \& email=steve@there
657 .Ve
658 .PP
659 will only recognize the last value. This can be worked around by using the form:
660 .PP
661 .Vb 1
662 \& [alt_section]
663 \&
664 \& email.1=steve@here
665 \& email.2=steve@there
666 .Ve
667 .SH "HISTORY"
668 .IX Header "HISTORY"
669 The X509v3 extension code was first added to OpenSSL 0.9.2.
670 .PP
671 Policy mappings, inhibit any policy and name constraints support was added in
672 OpenSSL 0.9.8
673 .PP
674 The \fBdirectoryName\fR and \fBotherName\fR option as well as the \fB\s-1ASN1\s0\fR option
675 for arbitrary extensions was added in OpenSSL 0.9.8
676 .SH "SEE ALSO"
677 .IX Header "SEE ALSO"
678 \&\fIreq\fR\|(1), \fIca\fR\|(1), \fIx509\fR\|(1),
679 \&\fIASN1_generate_nconf\fR\|(3)