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