1 .\" $NetBSD: libcrypto.pl,v 1.3 2007/11/27 22:16:03 christos Exp $
3 .\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05)
6 .\" ========================================================================
7 .de Sh \" Subsection heading
15 .de Sp \" Vertical space (when we can't use .PP)
19 .de Vb \" Begin verbatim text
24 .de Ve \" End verbatim text
28 .\" Set up some character translations and predefined strings. \*(-- will
29 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
30 .\" double quote, and \*(R" will give a right double quote. \*(C+ will
31 .\" give a nicer C++. Capital omega is used to do unbreakable dashes and
32 .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
33 .\" nothing in troff, for use with C<>.
35 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
39 . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
40 . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
53 .\" Escape single quotes in literal strings from groff's Unicode transform.
57 .\" If the F register is turned on, we'll generate index entries on stderr for
58 .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
59 .\" entries marked with X<> in POD. Of course, you'll have to process the
60 .\" output yourself in some meaningful fashion.
63 . tm Index:\\$1\t\\n%\t"\\$2"
73 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
74 .\" Fear. Run. Save yourself. No user-serviceable parts.
75 . \" fudge factors for nroff and troff
84 . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
90 . \" simple accents for nroff and troff
100 . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
101 . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
102 . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
103 . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
104 . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
105 . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
107 . \" troff and (daisy-wheel) nroff accents
108 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
109 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
110 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
111 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
112 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
113 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
114 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
115 .ds ae a\h'-(\w'a'u*4/10)'e
116 .ds Ae A\h'-(\w'A'u*4/10)'E
117 . \" corrections for vroff
118 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
119 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
120 . \" for low resolution devices (crt and lpr)
121 .if \n(.H>23 .if \n(.V>19 \
134 .\" ========================================================================
136 .IX Title "X509V3_CONFIG 1"
137 .TH X509V3_CONFIG 1 "2006-11-07" "1.1.0-dev" "OpenSSL"
138 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
139 .\" way too many mistakes in technical documents.
143 x509v3_config \- X509 V3 certificate extension configuration format
145 .IX Header "DESCRIPTION"
146 Several of the OpenSSL utilities can add extensions to a certificate or
147 certificate request based on the contents of a configuration file.
149 Typically the application will contain an option to point to an extension
150 section. Each line of the extension section takes the form:
153 \& extension_name=[critical,] extension_options
156 If \fBcritical\fR is present then the extension will be critical.
158 The format of \fBextension_options\fR depends on the value of \fBextension_name\fR.
160 There are four main types of extension: \fIstring\fR extensions, \fImulti-valued\fR
161 extensions, \fIraw\fR and \fIarbitrary\fR extensions.
163 String extensions simply have a string which contains either the value itself
164 or how it is obtained.
169 \& nsComment="This is a Comment"
172 Multi-valued extensions have a short form and a long form. The short form
173 is a list of names and values:
176 \& basicConstraints=critical,CA:true,pathlen:1
179 The long form allows the values to be placed in a separate section:
182 \& basicConstraints=critical,@bs_section
190 Both forms are equivalent.
192 The syntax of raw extensions is governed by the extension code: it can
193 for example contain data in multiple sections. The correct syntax to
194 use is defined by the extension code itself: check out the certificate
195 policies extension for an example.
197 If an extension type is unsupported then the \fIarbitrary\fR extension syntax
198 must be used, see the \s-1ARBITRARY\s0 \s-1EXTENSIONS\s0 section for more details.
199 .SH "STANDARD EXTENSIONS"
200 .IX Header "STANDARD EXTENSIONS"
201 The following sections describe each supported extension in detail.
202 .Sh "Basic Constraints."
203 .IX Subsection "Basic Constraints."
204 This is a multi valued extension which indicates whether a certificate is
205 a \s-1CA\s0 certificate. The first (mandatory) name is \fB\s-1CA\s0\fR followed by \fB\s-1TRUE\s0\fR or
206 \&\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
207 non-negative value can be included.
212 \& basicConstraints=CA:TRUE
214 \& basicConstraints=CA:FALSE
216 \& basicConstraints=critical,CA:TRUE, pathlen:0
219 A \s-1CA\s0 certificate \fBmust\fR include the basicConstraints value with the \s-1CA\s0 field
220 set to \s-1TRUE\s0. An end user certificate must either set \s-1CA\s0 to \s-1FALSE\s0 or exclude the
221 extension entirely. Some software may require the inclusion of basicConstraints
222 with \s-1CA\s0 set to \s-1FALSE\s0 for end entity certificates.
224 The pathlen parameter indicates the maximum number of CAs that can appear
225 below this one in a chain. So if you have a \s-1CA\s0 with a pathlen of zero it can
226 only be used to sign end user certificates and not further CAs.
228 .IX Subsection "Key Usage."
229 Key usage is a multi valued extension consisting of a list of names of the
230 permitted key usages.
232 The supporte names are: digitalSignature, nonRepudiation, keyEncipherment,
233 dataEncipherment, keyAgreement, keyCertSign, cRLSign, encipherOnly
239 \& keyUsage=digitalSignature, nonRepudiation
241 \& keyUsage=critical, keyCertSign
243 .Sh "Extended Key Usage."
244 .IX Subsection "Extended Key Usage."
245 This extensions consists of a list of usages indicating purposes for which
246 the certificate public key can be used for,
248 These can either be object short names of the dotted numerical form of OIDs.
249 While any \s-1OID\s0 can be used only certain values make sense. In particular the
250 following \s-1PKIX\s0, \s-1NS\s0 and \s-1MS\s0 values are meaningful:
254 \& \-\-\-\-\- \-\-\-\-\-\-\-
255 \& serverAuth SSL/TLS Web Server Authentication.
256 \& clientAuth SSL/TLS Web Client Authentication.
257 \& codeSigning Code signing.
258 \& emailProtection E\-mail Protection (S/MIME).
259 \& timeStamping Trusted Timestamping
260 \& msCodeInd Microsoft Individual Code Signing (authenticode)
261 \& msCodeCom Microsoft Commercial Code Signing (authenticode)
262 \& msCTLSign Microsoft Trust List Signing
263 \& msSGC Microsoft Server Gated Crypto
264 \& msEFS Microsoft Encrypted File System
265 \& nsSGC Netscape Server Gated Crypto
271 \& extendedKeyUsage=critical,codeSigning,1.2.3.4
272 \& extendedKeyUsage=nsSGC,msSGC
274 .Sh "Subject Key Identifier."
275 .IX Subsection "Subject Key Identifier."
276 This is really a string extension and can take two possible values. Either
277 the word \fBhash\fR which will automatically follow the guidelines in \s-1RFC3280\s0
278 or a hex string giving the extension value to include. The use of the hex
279 string is strongly discouraged.
284 \& subjectKeyIdentifier=hash
286 .Sh "Authority Key Identifier."
287 .IX Subsection "Authority Key Identifier."
288 The authority key identifier extension permits two options. keyid and issuer:
289 both can take the optional value \*(L"always\*(R".
291 If the keyid option is present an attempt is made to copy the subject key
292 identifier from the parent certificate. If the value \*(L"always\*(R" is present
293 then an error is returned if the option fails.
295 The issuer option copies the issuer and serial number from the issuer
296 certificate. This will only be done if the keyid option fails or
297 is not included unless the \*(L"always\*(R" flag will always include the value.
302 \& authorityKeyIdentifier=keyid,issuer
304 .Sh "Subject Alternative Name."
305 .IX Subsection "Subject Alternative Name."
306 The subject alternative name extension allows various literal values to be
307 included in the configuration file. These include \fBemail\fR (an email address)
308 \&\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
309 registered \s-1ID:\s0 \s-1OBJECT\s0 \s-1IDENTIFIER\s0), \fB\s-1IP\s0\fR (an \s-1IP\s0 address), \fBdirName\fR
310 (a distinguished name) and otherName.
312 The email option include a special 'copy' value. This will automatically
313 include and email addresses contained in the certificate subject name in
316 The \s-1IP\s0 address used in the \fB\s-1IP\s0\fR options can be in either IPv4 or IPv6 format.
318 The value of \fBdirName\fR should point to a section containing the distinguished
319 name to use as a set of name value pairs. Multi values AVAs can be formed by
320 preceeding the name with a \fB+\fR character.
322 otherName can include arbitrary data associated with an \s-1OID:\s0 the value
323 should be the \s-1OID\s0 followed by a semicolon and the content in standard
324 \&\fIASN1_generate_nconf\fR\|(3) format.
329 \& subjectAltName=email:copy,email:my@other.address,URI:http://my.url.here/
330 \& subjectAltName=IP:192.168.7.1
331 \& subjectAltName=IP:13::17
332 \& subjectAltName=email:my@other.address,RID:1.2.3.4
333 \& subjectAltName=otherName:1.2.3.4;UTF8:some other identifier
335 \& subjectAltName=dirName:dir_sect
343 .Sh "Issuer Alternative Name."
344 .IX Subsection "Issuer Alternative Name."
345 The issuer alternative name option supports all the literal options of
346 subject alternative name. It does \fBnot\fR support the email:copy option because
347 that would not make sense. It does support an additional issuer:copy option
348 that will copy all the subject alternative name values from the issuer
349 certificate (if possible).
354 \& issuserAltName = issuer:copy
356 .Sh "Authority Info Access."
357 .IX Subsection "Authority Info Access."
358 The authority information access extension gives details about how to access
359 certain information relating to the \s-1CA\s0. Its syntax is accessOID;location
360 where \fIlocation\fR has the same syntax as subject alternative name (except
361 that email:copy is not supported). accessOID can be any valid \s-1OID\s0 but only
362 certain values are meaningful, for example \s-1OCSP\s0 and caIssuers.
367 \& authorityInfoAccess = OCSP;URI:http://ocsp.my.host/
368 \& authorityInfoAccess = caIssuers;URI:http://my.ca/ca.html
370 .Sh "\s-1CRL\s0 distribution points."
371 .IX Subsection "CRL distribution points."
372 This is a multi-valued extension whose options can be either in name:value pair
373 using the same form as subject alternative name or a single value representing
374 a section name containing all the distribution point fields.
376 For a name:value pair a new DistributionPoint with the fullName field set to
377 the given value both the cRLissuer and reasons fields are omitted in this case.
379 In the single option case the section indicated contains values for each
380 field. In this section:
382 If the name is \*(L"fullname\*(R" the value field should contain the full name
383 of the distribution point in the same format as subject alternative name.
385 If the name is \*(L"relativename\*(R" then the value field should contain a section
386 name whose contents represent a \s-1DN\s0 fragment to be placed in this field.
388 The name \*(L"CRLIssuer\*(R" if present should contain a value for this field in
389 subject alternative name format.
391 If the name is \*(L"reasons\*(R" the value field should consist of a comma
392 separated field containing the reasons. Valid reasons are: \*(L"keyCompromise\*(R",
393 \&\*(L"CACompromise\*(R", \*(L"affiliationChanged\*(R", \*(L"superseded\*(R", \*(L"cessationOfOperation\*(R",
394 \&\*(L"certificateHold\*(R", \*(L"privilegeWithdrawn\*(R" and \*(L"AACompromise\*(R".
399 \& crlDistributionPoints=URI:http://myhost.com/myca.crl
400 \& crlDistributionPoints=URI:http://my.com/my.crl,URI:http://oth.com/my.crl
403 Full distribution point example:
406 \& crlDistributionPoints=crldp1_section
410 \& fullname=URI:http://myhost.com/myca.crl
411 \& CRLissuer=dirName:issuer_sect
412 \& reasons=keyCompromise, CACompromise
419 .Sh "Issuing Distribution Point"
420 .IX Subsection "Issuing Distribution Point"
421 This extension should only appear in CRLs. It is a multi valued extension
422 whose syntax is similar to the \*(L"section\*(R" pointed to by the \s-1CRL\s0 distribution
423 points extension with a few differences.
425 The names \*(L"reasons\*(R" and \*(L"CRLissuer\*(R" are not recognized.
427 The name \*(L"onlysomereasons\*(R" is accepted which sets this field. The value is
428 in the same format as the \s-1CRL\s0 distribution point \*(L"reasons\*(R" field.
430 The names \*(L"onlyuser\*(R", \*(L"onlyCA\*(R", \*(L"onlyAA\*(R" and \*(L"indirectCRL\*(R" are also accepted
431 the values should be a boolean value (\s-1TRUE\s0 or \s-1FALSE\s0) to indicate the value of
432 the corresponding field.
437 \& issuingDistributionPoint=critical, @idp_section
441 \& fullname=URI:http://myhost.com/myca.crl
443 \& onlysomereasons=keyCompromise, CACompromise
450 .Sh "Certificate Policies."
451 .IX Subsection "Certificate Policies."
452 This is a \fIraw\fR extension. All the fields of this extension can be set by
453 using the appropriate syntax.
455 If you follow the \s-1PKIX\s0 recommendations and just using one \s-1OID\s0 then you just
456 include the value of that \s-1OID\s0. Multiple OIDs can be set separated by commas,
460 \& certificatePolicies= 1.2.4.5, 1.1.3.4
463 If you wish to include qualifiers then the policy \s-1OID\s0 and qualifiers need to
464 be specified in a separate section: this is done by using the \f(CW@section\fR syntax
465 instead of a literal \s-1OID\s0 value.
467 The section referred to must include the policy \s-1OID\s0 using the name
468 policyIdentifier, cPSuri qualifiers can be included using the syntax:
474 userNotice qualifiers can be set using the syntax:
477 \& userNotice.nnn=@notice
480 The value of the userNotice qualifier is specified in the relevant section.
481 This section can include explicitText, organization and noticeNumbers
482 options. explicitText and organization are text strings, noticeNumbers is a
483 comma separated list of numbers. The organization and noticeNumbers options
484 (if included) must \s-1BOTH\s0 be present. If you use the userNotice option with \s-1IE5\s0
485 then you need the 'ia5org' option at the top level to modify the encoding:
486 otherwise it will not be interpreted properly.
491 \& certificatePolicies=ia5org,1.2.3.4,1.5.6.7.8,@polsect
495 \& policyIdentifier = 1.3.5.8
496 \& CPS.1="http://my.host.name/"
497 \& CPS.2="http://my.your.name/"
498 \& userNotice.1=@notice
502 \& explicitText="Explicit Text Here"
503 \& organization="Organisation Name"
504 \& noticeNumbers=1,2,3,4
507 The \fBia5org\fR option changes the type of the \fIorganization\fR field. In \s-1RFC2459\s0
508 it can only be of type DisplayText. In \s-1RFC3280\s0 IA5Strring is also permissible.
509 Some software (for example some versions of \s-1MSIE\s0) may require ia5org.
510 .Sh "Policy Constraints"
511 .IX Subsection "Policy Constraints"
512 This is a multi-valued extension which consisting of the names
513 \&\fBrequireExplicitPolicy\fR or \fBinhibitPolicyMapping\fR and a non negative intger
514 value. At least one component must be present.
519 \& policyConstraints = requireExplicitPolicy:3
521 .Sh "Inhibit Any Policy"
522 .IX Subsection "Inhibit Any Policy"
523 This is a string extension whose value must be a non negative integer.
528 \& inhibitAnyPolicy = 2
530 .Sh "Name Constraints"
531 .IX Subsection "Name Constraints"
532 The name constraints extension is a multi-valued extension. The name should
533 begin with the word \fBpermitted\fR or \fBexcluded\fR followed by a \fB;\fR. The rest of
534 the name and the value follows the syntax of subjectAltName except email:copy
535 is not supported and the \fB\s-1IP\s0\fR form should consist of an \s-1IP\s0 addresses and
536 subnet mask separated by a \fB/\fR.
541 \& nameConstraints=permitted;IP:192.168.0.0/255.255.0.0
543 \& nameConstraints=permitted;email:.somedomain.com
545 \& nameConstraints=excluded;email:.com
546 \&issuingDistributionPoint = idp_section
548 .Sh "\s-1OCSP\s0 No Check"
549 .IX Subsection "OCSP No Check"
550 The \s-1OCSP\s0 No Check extension is a string extension but its value is ignored.
557 .SH "DEPRECATED EXTENSIONS"
558 .IX Header "DEPRECATED EXTENSIONS"
559 The following extensions are non standard, Netscape specific and largely
560 obsolete. Their use in new applications is discouraged.
561 .Sh "Netscape String extensions."
562 .IX Subsection "Netscape String extensions."
563 Netscape Comment (\fBnsComment\fR) is a string extension containing a comment
564 which will be displayed when the certificate is viewed in some browsers.
569 \& nsComment = "Some Random Comment"
572 Other supported extensions in this category are: \fBnsBaseUrl\fR,
573 \&\fBnsRevocationUrl\fR, \fBnsCaRevocationUrl\fR, \fBnsRenewalUrl\fR, \fBnsCaPolicyUrl\fR
574 and \fBnsSslServerName\fR.
575 .Sh "Netscape Certificate Type"
576 .IX Subsection "Netscape Certificate Type"
577 This is a multi-valued extensions which consists of a list of flags to be
578 included. It was used to indicate the purposes for which a certificate could
579 be used. The basicConstraints, keyUsage and extended key usage extensions are
582 Acceptable values for nsCertType are: \fBclient\fR, \fBserver\fR, \fBemail\fR,
583 \&\fBobjsign\fR, \fBreserved\fR, \fBsslCA\fR, \fBemailCA\fR, \fBobjCA\fR.
584 .SH "ARBITRARY EXTENSIONS"
585 .IX Header "ARBITRARY EXTENSIONS"
586 If an extension is not supported by the OpenSSL code then it must be encoded
587 using the arbitrary extension format. It is also possible to use the arbitrary
588 format for supported extensions. Extreme care should be taken to ensure that
589 the data is formatted correctly for the given extension type.
591 There are two ways to encode arbitrary extensions.
593 The first way is to use the word \s-1ASN1\s0 followed by the extension content
594 using the same syntax as \fIASN1_generate_nconf\fR\|(3).
598 \& 1.2.3.4=critical,ASN1:UTF8String:Some random data
600 \& 1.2.3.4=ASN1:SEQUENCE:seq_sect
604 \& field1 = UTF8:field1
605 \& field2 = UTF8:field2
608 It is also possible to use the word \s-1DER\s0 to include the raw encoded data in any
612 \& 1.2.3.4=critical,DER:01:02:03:04
613 \& 1.2.3.4=DER:01020304
616 The value following \s-1DER\s0 is a hex dump of the \s-1DER\s0 encoding of the extension
617 Any extension can be placed in this form to override the default behaviour.
621 \& basicConstraints=critical,DER:00:01:02:03
625 There is no guarantee that a specific implementation will process a given
626 extension. It may therefore be sometimes possible to use certificates for
627 purposes prohibited by their extensions because a specific application does
628 not recognize or honour the values of the relevant extensions.
630 The \s-1DER\s0 and \s-1ASN1\s0 options should be used with caution. It is possible to create
631 totally invalid extensions if they are not used carefully.
634 If an extension is multi-value and a field value must contain a comma the long
635 form must be used otherwise the comma would be misinterpreted as a field
636 separator. For example:
639 \& subjectAltName=URI:ldap://somehost.com/CN=foo,OU=bar
642 will produce an error but the equivalent form:
645 \& subjectAltName=@subject_alt_section
647 \& [subject_alt_section]
648 \& subjectAltName=URI:ldap://somehost.com/CN=foo,OU=bar
653 Due to the behaviour of the OpenSSL \fBconf\fR library the same field name
654 can only occur once in a section. This means that:
657 \& subjectAltName=@alt_section
665 will only recognize the last value. This can be worked around by using the form:
670 \& email.1=steve@here
671 \& email.2=steve@there
675 The X509v3 extension code was first added to OpenSSL 0.9.2.
677 Policy mappings, inhibit any policy and name constraints support was added in
680 The \fBdirectoryName\fR and \fBotherName\fR option as well as the \fB\s-1ASN1\s0\fR option
681 for arbitrary extensions was added in OpenSSL 0.9.8
683 .IX Header "SEE ALSO"
684 \&\fIopenssl_req\fR\|(1), \fIopenssl_ca\fR\|(1), \fIopenssl_x509\fR\|(1),
685 \&\fIASN1_generate_nconf\fR\|(3)