1 .\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07)
4 .\" ========================================================================
5 .de Sp \" Vertical space (when we can't use .PP)
9 .de Vb \" Begin verbatim text
14 .de Ve \" End verbatim text
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<>.
25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
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
43 .\" Escape single quotes in literal strings from groff's Unicode transform.
47 .\" If the F register is turned on, we'll generate index entries on stderr for
48 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
49 .\" entries marked with X<> in POD. Of course, you'll have to process the
50 .\" output yourself in some meaningful fashion.
53 . tm Index:\\$1\t\\n%\t"\\$2"
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
74 . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
80 . \" simple accents for nroff and troff
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'
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 \
124 .\" ========================================================================
126 .IX Title "X509V3_CONFIG 1"
127 .TH X509V3_CONFIG 1 "2010-12-02" "0.9.8q" "OpenSSL"
128 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
129 .\" way too many mistakes in technical documents.
133 x509v3_config \- X509 V3 certificate extension configuration format
135 .IX Header "DESCRIPTION"
136 Several of the OpenSSL utilities can add extensions to a certificate or
137 certificate request based on the contents of a configuration file.
139 Typically the application will contain an option to point to an extension
140 section. Each line of the extension section takes the form:
143 \& extension_name=[critical,] extension_options
146 If \fBcritical\fR is present then the extension will be critical.
148 The format of \fBextension_options\fR depends on the value of \fBextension_name\fR.
150 There are four main types of extension: \fIstring\fR extensions, \fImulti-valued\fR
151 extensions, \fIraw\fR and \fIarbitrary\fR extensions.
153 String extensions simply have a string which contains either the value itself
154 or how it is obtained.
159 \& nsComment="This is a Comment"
162 Multi-valued extensions have a short form and a long form. The short form
163 is a list of names and values:
166 \& basicConstraints=critical,CA:true,pathlen:1
169 The long form allows the values to be placed in a separate section:
172 \& basicConstraints=critical,@bs_section
180 Both forms are equivalent.
182 The syntax of raw extensions is governed by the extension code: it can
183 for example contain data in multiple sections. The correct syntax to
184 use is defined by the extension code itself: check out the certificate
185 policies extension for an example.
187 If an extension type is unsupported then the \fIarbitrary\fR extension syntax
188 must be used, see the \s-1ARBITRART\s0 \s-1EXTENSIONS\s0 section for more details.
189 .SH "STANDARD EXTENSIONS"
190 .IX Header "STANDARD EXTENSIONS"
191 The following sections describe each supported extension in detail.
192 .SS "Basic Constraints."
193 .IX Subsection "Basic Constraints."
194 This is a multi valued extension which indicates whether a certificate is
195 a \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
197 non-negative value can be included.
202 \& basicConstraints=CA:TRUE
204 \& basicConstraints=CA:FALSE
206 \& basicConstraints=critical,CA:TRUE, pathlen:0
209 A \s-1CA\s0 certificate \fBmust\fR include the basicConstraints value with the \s-1CA\s0 field
210 set to \s-1TRUE\s0. An end user certificate must either set \s-1CA\s0 to \s-1FALSE\s0 or exclude the
211 extension entirely. Some software may require the inclusion of basicConstraints
212 with \s-1CA\s0 set to \s-1FALSE\s0 for end entity certificates.
214 The pathlen parameter indicates the maximum number of CAs that can appear
215 below this one in a chain. So if you have a \s-1CA\s0 with a pathlen of zero it can
216 only be used to sign end user certificates and not further CAs.
218 .IX Subsection "Key Usage."
219 Key usage is a multi valued extension consisting of a list of names of the
220 permitted key usages.
222 The supporte names are: digitalSignature, nonRepudiation, keyEncipherment,
223 dataEncipherment, keyAgreement, keyCertSign, cRLSign, encipherOnly
229 \& keyUsage=digitalSignature, nonRepudiation
231 \& keyUsage=critical, keyCertSign
233 .SS "Extended Key Usage."
234 .IX Subsection "Extended Key Usage."
235 This extensions consists of a list of usages indicating purposes for which
236 the certificate public key can be used for,
238 These can either be object short names of the dotted numerical form of OIDs.
239 While any \s-1OID\s0 can be used only certain values make sense. In particular the
240 following \s-1PKIX\s0, \s-1NS\s0 and \s-1MS\s0 values are meaningful:
244 \& \-\-\-\-\- \-\-\-\-\-\-\-
245 \& serverAuth SSL/TLS Web Server Authentication.
246 \& clientAuth SSL/TLS Web Client Authentication.
247 \& codeSigning Code signing.
248 \& emailProtection E\-mail Protection (S/MIME).
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
261 \& extendedKeyUsage=critical,codeSigning,1.2.3.4
262 \& extendedKeyUsage=nsSGC,msSGC
264 .SS "Subject Key Identifier."
265 .IX Subsection "Subject Key Identifier."
266 This is really a string extension and can take two possible values. Either
267 the word \fBhash\fR which will automatically follow the guidelines in \s-1RFC3280\s0
268 or a hex string giving the extension value to include. The use of the hex
269 string is strongly discouraged.
274 \& subjectKeyIdentifier=hash
276 .SS "Authority Key Identifier."
277 .IX Subsection "Authority Key Identifier."
278 The authority key identifier extension permits two options. keyid and issuer:
279 both can take the optional value \*(L"always\*(R".
281 If the keyid option is present an attempt is made to copy the subject key
282 identifier from the parent certificate. If the value \*(L"always\*(R" is present
283 then an error is returned if the option fails.
285 The issuer option copies the issuer and serial number from the issuer
286 certificate. This will only be done if the keyid option fails or
287 is not included unless the \*(L"always\*(R" flag will always include the value.
292 \& authorityKeyIdentifier=keyid,issuer
294 .SS "Subject Alternative Name."
295 .IX Subsection "Subject Alternative Name."
296 The subject alternative name extension allows various literal values to be
297 included 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
299 registered \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.
302 The email option include a special 'copy' value. This will automatically
303 include and email addresses contained in the certificate subject name in
306 The \s-1IP\s0 address used in the \fB\s-1IP\s0\fR options can be in either IPv4 or IPv6 format.
308 The value of \fBdirName\fR should point to a section containing the distinguished
309 name to use as a set of name value pairs. Multi values AVAs can be formed by
310 preceeding the name with a \fB+\fR character.
312 otherName can include arbitrary data associated with an \s-1OID:\s0 the value
313 should be the \s-1OID\s0 followed by a semicolon and the content in standard
314 \&\fIASN1_generate_nconf()\fR format.
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
325 \& subjectAltName=dirName:dir_sect
333 .SS "Issuer Alternative Name."
334 .IX Subsection "Issuer Alternative Name."
335 The issuer alternative name option supports all the literal options of
336 subject alternative name. It does \fBnot\fR support the email:copy option because
337 that would not make sense. It does support an additional issuer:copy option
338 that will copy all the subject alternative name values from the issuer
339 certificate (if possible).
344 \& issuserAltName = issuer:copy
346 .SS "Authority Info Access."
347 .IX Subsection "Authority Info Access."
348 The authority information access extension gives details about how to access
349 certain information relating to the \s-1CA\s0. Its syntax is accessOID;location
350 where \fIlocation\fR has the same syntax as subject alternative name (except
351 that email:copy is not supported). accessOID can be any valid \s-1OID\s0 but only
352 certain values are meaningful, for example \s-1OCSP\s0 and caIssuers.
357 \& authorityInfoAccess = OCSP;URI:http://ocsp.my.host/
358 \& authorityInfoAccess = caIssuers;URI:http://my.ca/ca.html
360 .SS "\s-1CRL\s0 distribution points."
361 .IX Subsection "CRL distribution points."
362 This is a multi-valued extension that supports all the literal options of
363 subject alternative name. Of the few software packages that currently interpret
364 this extension most only interpret the \s-1URI\s0 option.
366 Currently each option will set a new DistributionPoint with the fullName
367 field set to the given value.
369 Other fields like cRLissuer and reasons cannot currently be set or displayed:
370 at this time no examples were available that used these fields.
375 \& crlDistributionPoints=URI:http://myhost.com/myca.crl
376 \& crlDistributionPoints=URI:http://my.com/my.crl,URI:http://oth.com/my.crl
378 .SS "Certificate Policies."
379 .IX Subsection "Certificate Policies."
380 This is a \fIraw\fR extension. All the fields of this extension can be set by
381 using the appropriate syntax.
383 If you follow the \s-1PKIX\s0 recommendations and just using one \s-1OID\s0 then you just
384 include the value of that \s-1OID\s0. Multiple OIDs can be set separated by commas,
388 \& certificatePolicies= 1.2.4.5, 1.1.3.4
391 If you wish to include qualifiers then the policy \s-1OID\s0 and qualifiers need to
392 be specified in a separate section: this is done by using the \f(CW@section\fR syntax
393 instead of a literal \s-1OID\s0 value.
395 The section referred to must include the policy \s-1OID\s0 using the name
396 policyIdentifier, cPSuri qualifiers can be included using the syntax:
402 userNotice qualifiers can be set using the syntax:
405 \& userNotice.nnn=@notice
408 The value of the userNotice qualifier is specified in the relevant section.
409 This section can include explicitText, organization and noticeNumbers
410 options. explicitText and organization are text strings, noticeNumbers is a
411 comma separated list of numbers. The organization and noticeNumbers options
412 (if included) must \s-1BOTH\s0 be present. If you use the userNotice option with \s-1IE5\s0
413 then you need the 'ia5org' option at the top level to modify the encoding:
414 otherwise it will not be interpreted properly.
419 \& certificatePolicies=ia5org,1.2.3.4,1.5.6.7.8,@polsect
423 \& policyIdentifier = 1.3.5.8
424 \& CPS.1="http://my.host.name/"
425 \& CPS.2="http://my.your.name/"
426 \& userNotice.1=@notice
430 \& explicitText="Explicit Text Here"
431 \& organization="Organisation Name"
432 \& noticeNumbers=1,2,3,4
435 The \fBia5org\fR option changes the type of the \fIorganization\fR field. In \s-1RFC2459\s0
436 it can only be of type DisplayText. In \s-1RFC3280\s0 IA5Strring is also permissible.
437 Some software (for example some versions of \s-1MSIE\s0) may require ia5org.
438 .SS "Policy Constraints"
439 .IX Subsection "Policy Constraints"
440 This is a multi-valued extension which consisting of the names
441 \&\fBrequireExplicitPolicy\fR or \fBinhibitPolicyMapping\fR and a non negative intger
442 value. At least one component must be present.
447 \& policyConstraints = requireExplicitPolicy:3
449 .SS "Inhibit Any Policy"
450 .IX Subsection "Inhibit Any Policy"
451 This is a string extension whose value must be a non negative integer.
456 \& inhibitAnyPolicy = 2
458 .SS "Name Constraints"
459 .IX Subsection "Name Constraints"
460 The name constraints extension is a multi-valued extension. The name should
461 begin with the word \fBpermitted\fR or \fBexcluded\fR followed by a \fB;\fR. The rest of
462 the name and the value follows the syntax of subjectAltName except email:copy
463 is not supported and the \fB\s-1IP\s0\fR form should consist of an \s-1IP\s0 addresses and
464 subnet mask separated by a \fB/\fR.
469 \& nameConstraints=permitted;IP:192.168.0.0/255.255.0.0
471 \& nameConstraints=permitted;email:.somedomain.com
473 \& nameConstraints=excluded;email:.com
475 .SH "DEPRECATED EXTENSIONS"
476 .IX Header "DEPRECATED EXTENSIONS"
477 The following extensions are non standard, Netscape specific and largely
478 obsolete. Their use in new applications is discouraged.
479 .SS "Netscape String extensions."
480 .IX Subsection "Netscape String extensions."
481 Netscape Comment (\fBnsComment\fR) is a string extension containing a comment
482 which will be displayed when the certificate is viewed in some browsers.
487 \& nsComment = "Some Random Comment"
490 Other supported extensions in this category are: \fBnsBaseUrl\fR,
491 \&\fBnsRevocationUrl\fR, \fBnsCaRevocationUrl\fR, \fBnsRenewalUrl\fR, \fBnsCaPolicyUrl\fR
492 and \fBnsSslServerName\fR.
493 .SS "Netscape Certificate Type"
494 .IX Subsection "Netscape Certificate Type"
495 This is a multi-valued extensions which consists of a list of flags to be
496 included. It was used to indicate the purposes for which a certificate could
497 be used. The basicConstraints, keyUsage and extended key usage extensions are
500 Acceptable values for nsCertType are: \fBclient\fR, \fBserver\fR, \fBemail\fR,
501 \&\fBobjsign\fR, \fBreserved\fR, \fBsslCA\fR, \fBemailCA\fR, \fBobjCA\fR.
502 .SH "ARBITRARY EXTENSIONS"
503 .IX Header "ARBITRARY EXTENSIONS"
504 If an extension is not supported by the OpenSSL code then it must be encoded
505 using the arbitrary extension format. It is also possible to use the arbitrary
506 format for supported extensions. Extreme care should be taken to ensure that
507 the data is formatted correctly for the given extension type.
509 There are two ways to encode arbitrary extensions.
511 The first way is to use the word \s-1ASN1\s0 followed by the extension content
512 using the same syntax as \fIASN1_generate_nconf()\fR. For example:
515 \& 1.2.3.4=critical,ASN1:UTF8String:Some random data
517 \& 1.2.3.4=ASN1:SEQUENCE:seq_sect
521 \& field1 = UTF8:field1
522 \& field2 = UTF8:field2
525 It is also possible to use the word \s-1DER\s0 to include the raw encoded data in any
529 \& 1.2.3.4=critical,DER:01:02:03:04
530 \& 1.2.3.4=DER:01020304
533 The value following \s-1DER\s0 is a hex dump of the \s-1DER\s0 encoding of the extension
534 Any extension can be placed in this form to override the default behaviour.
538 \& basicConstraints=critical,DER:00:01:02:03
542 There is no guarantee that a specific implementation will process a given
543 extension. It may therefore be sometimes possible to use certificates for
544 purposes prohibited by their extensions because a specific application does
545 not recognize or honour the values of the relevant extensions.
547 The \s-1DER\s0 and \s-1ASN1\s0 options should be used with caution. It is possible to create
548 totally invalid extensions if they are not used carefully.
551 If an extension is multi-value and a field value must contain a comma the long
552 form must be used otherwise the comma would be misinterpreted as a field
553 separator. For example:
556 \& subjectAltName=URI:ldap://somehost.com/CN=foo,OU=bar
559 will produce an error but the equivalent form:
562 \& subjectAltName=@subject_alt_section
564 \& [subject_alt_section]
565 \& subjectAltName=URI:ldap://somehost.com/CN=foo,OU=bar
570 Due to the behaviour of the OpenSSL \fBconf\fR library the same field name
571 can only occur once in a section. This means that:
574 \& subjectAltName=@alt_section
582 will only recognize the last value. This can be worked around by using the form:
587 \& email.1=steve@here
588 \& email.2=steve@there
592 The X509v3 extension code was first added to OpenSSL 0.9.2.
594 Policy mappings, inhibit any policy and name constraints support was added in
597 The \fBdirectoryName\fR and \fBotherName\fR option as well as the \fB\s-1ASN1\s0\fR option
598 for arbitrary extensions was added in OpenSSL 0.9.8
600 .IX Header "SEE ALSO"
601 \&\fIreq\fR\|(1), \fIca\fR\|(1), \fIx509\fR\|(1)