x509v3_config.5ossl 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771
  1. .\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
  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. .nr rF 0
  58. .if \n(.g .if rF .nr rF 1
  59. .if (\n(rF:(\n(.g==0)) \{\
  60. . if \nF \{\
  61. . de IX
  62. . tm Index:\\$1\t\\n%\t"\\$2"
  63. ..
  64. . if !\nF==2 \{\
  65. . nr % 0
  66. . nr F 2
  67. . \}
  68. . \}
  69. .\}
  70. .rr rF
  71. .\"
  72. .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
  73. .\" Fear. Run. Save yourself. No user-serviceable parts.
  74. . \" fudge factors for nroff and troff
  75. .if n \{\
  76. . ds #H 0
  77. . ds #V .8m
  78. . ds #F .3m
  79. . ds #[ \f1
  80. . ds #] \fP
  81. .\}
  82. .if t \{\
  83. . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
  84. . ds #V .6m
  85. . ds #F 0
  86. . ds #[ \&
  87. . ds #] \&
  88. .\}
  89. . \" simple accents for nroff and troff
  90. .if n \{\
  91. . ds ' \&
  92. . ds ` \&
  93. . ds ^ \&
  94. . ds , \&
  95. . ds ~ ~
  96. . ds /
  97. .\}
  98. .if t \{\
  99. . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
  100. . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
  101. . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
  102. . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
  103. . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
  104. . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
  105. .\}
  106. . \" troff and (daisy-wheel) nroff accents
  107. .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
  108. .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
  109. .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
  110. .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
  111. .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
  112. .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
  113. .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
  114. .ds ae a\h'-(\w'a'u*4/10)'e
  115. .ds Ae A\h'-(\w'A'u*4/10)'E
  116. . \" corrections for vroff
  117. .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
  118. .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
  119. . \" for low resolution devices (crt and lpr)
  120. .if \n(.H>23 .if \n(.V>19 \
  121. \{\
  122. . ds : e
  123. . ds 8 ss
  124. . ds o a
  125. . ds d- d\h'-1'\(ga
  126. . ds D- D\h'-1'\(hy
  127. . ds th \o'bp'
  128. . ds Th \o'LP'
  129. . ds ae ae
  130. . ds Ae AE
  131. .\}
  132. .rm #[ #] #H #V #F C
  133. .\" ========================================================================
  134. .\"
  135. .IX Title "X509V3_CONFIG 5ossl"
  136. .TH X509V3_CONFIG 5ossl "2024-09-03" "3.3.2" "OpenSSL"
  137. .\" For nroff, turn off justification. Always turn off hyphenation; it makes
  138. .\" way too many mistakes in technical documents.
  139. .if n .ad l
  140. .nh
  141. .SH "NAME"
  142. x509v3_config \- X509 V3 certificate extension configuration format
  143. .SH "DESCRIPTION"
  144. .IX Header "DESCRIPTION"
  145. Several OpenSSL commands can add extensions to a certificate or
  146. certificate request based on the contents of a configuration file
  147. and \s-1CLI\s0 options such as \fB\-addext\fR.
  148. The syntax of configuration files is described in \fBconfig\fR\|(5).
  149. The commands typically have an option to specify the name of the configuration
  150. file, and a section within that file; see the documentation of the
  151. individual command for details.
  152. .PP
  153. This page uses \fBextensions\fR as the name of the section, when needed
  154. in examples.
  155. .PP
  156. Each entry in the extension section takes the form:
  157. .PP
  158. .Vb 1
  159. \& name = [critical, ]value(s)
  160. .Ve
  161. .PP
  162. If \fBcritical\fR is present then the extension will be marked as critical.
  163. .PP
  164. If multiple entries are processed for the same extension name,
  165. later entries override earlier ones with the same name.
  166. .PP
  167. The format of \fBvalues\fR depends on the value of \fBname\fR, many have a
  168. type-value pairing where the type and value are separated by a colon.
  169. There are four main types of extension:
  170. .PP
  171. .Vb 4
  172. \& string
  173. \& multi\-valued
  174. \& raw
  175. \& arbitrary
  176. .Ve
  177. .PP
  178. Each is described in the following paragraphs.
  179. .PP
  180. String extensions simply have a string which contains either the value itself
  181. or how it is obtained.
  182. .PP
  183. Multi-valued extensions have a short form and a long form. The short form
  184. is a comma-separated list of names and values:
  185. .PP
  186. .Vb 1
  187. \& basicConstraints = critical, CA:true, pathlen:1
  188. .Ve
  189. .PP
  190. The long form allows the values to be placed in a separate section:
  191. .PP
  192. .Vb 2
  193. \& [extensions]
  194. \& basicConstraints = critical, @basic_constraints
  195. \&
  196. \& [basic_constraints]
  197. \& CA = true
  198. \& pathlen = 1
  199. .Ve
  200. .PP
  201. Both forms are equivalent.
  202. .PP
  203. If an extension is multi-value and a field value must contain a comma the long
  204. form must be used otherwise the comma would be misinterpreted as a field
  205. separator. For example:
  206. .PP
  207. .Vb 1
  208. \& subjectAltName = URI:ldap://somehost.com/CN=foo,OU=bar
  209. .Ve
  210. .PP
  211. will produce an error but the equivalent form:
  212. .PP
  213. .Vb 2
  214. \& [extensions]
  215. \& subjectAltName = @subject_alt_section
  216. \&
  217. \& [subject_alt_section]
  218. \& subjectAltName = URI:ldap://somehost.com/CN=foo,OU=bar
  219. .Ve
  220. .PP
  221. is valid.
  222. .PP
  223. OpenSSL does not support multiple occurrences of the same field within a
  224. section. In this example:
  225. .PP
  226. .Vb 2
  227. \& [extensions]
  228. \& subjectAltName = @alt_section
  229. \&
  230. \& [alt_section]
  231. \& email = steve@example.com
  232. \& email = steve@example.org
  233. .Ve
  234. .PP
  235. will only recognize the last value. To specify multiple values append a
  236. numeric identifier, as shown here:
  237. .PP
  238. .Vb 2
  239. \& [extensions]
  240. \& subjectAltName = @alt_section
  241. \&
  242. \& [alt_section]
  243. \& email.1 = steve@example.com
  244. \& email.2 = steve@example.org
  245. .Ve
  246. .PP
  247. The syntax of raw extensions is defined by the source code that parses
  248. the extension but should be documented.
  249. See \*(L"Certificate Policies\*(R" for an example of a raw extension.
  250. .PP
  251. If an extension type is unsupported, then the \fIarbitrary\fR extension syntax
  252. must be used, see the \*(L"\s-1ARBITRARY EXTENSIONS\*(R"\s0 section for more details.
  253. .SH "STANDARD EXTENSIONS"
  254. .IX Header "STANDARD EXTENSIONS"
  255. The following sections describe the syntax of each supported extension.
  256. They do not define the semantics of the extension.
  257. .SS "Basic Constraints"
  258. .IX Subsection "Basic Constraints"
  259. This is a multi-valued extension which indicates whether a certificate is
  260. a \s-1CA\s0 certificate. The first value is \fB\s-1CA\s0\fR followed by \fB\s-1TRUE\s0\fR or
  261. \&\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 a
  262. nonnegative value can be included.
  263. .PP
  264. For example:
  265. .PP
  266. .Vb 1
  267. \& basicConstraints = CA:TRUE
  268. \&
  269. \& basicConstraints = CA:FALSE
  270. \&
  271. \& basicConstraints = critical, CA:TRUE, pathlen:1
  272. .Ve
  273. .PP
  274. A \s-1CA\s0 certificate \fImust\fR include the \fBbasicConstraints\fR name with the \fB\s-1CA\s0\fR
  275. parameter set to \fB\s-1TRUE\s0\fR. An end-user certificate must either have \fB\s-1CA:FALSE\s0\fR
  276. or omit the extension entirely.
  277. The \fBpathlen\fR parameter specifies the maximum number of CAs that can appear
  278. below this one in a chain. A \fBpathlen\fR of zero means the \s-1CA\s0 cannot sign
  279. any sub-CA's, and can only sign end-entity certificates.
  280. .SS "Key Usage"
  281. .IX Subsection "Key Usage"
  282. Key usage is a multi-valued extension consisting of a list of names of
  283. the permitted key usages. The defined values are: \f(CW\*(C`digitalSignature\*(C'\fR,
  284. \&\f(CW\*(C`nonRepudiation\*(C'\fR, \f(CW\*(C`keyEncipherment\*(C'\fR, \f(CW\*(C`dataEncipherment\*(C'\fR, \f(CW\*(C`keyAgreement\*(C'\fR,
  285. \&\f(CW\*(C`keyCertSign\*(C'\fR, \f(CW\*(C`cRLSign\*(C'\fR, \f(CW\*(C`encipherOnly\*(C'\fR, and \f(CW\*(C`decipherOnly\*(C'\fR.
  286. .PP
  287. Examples:
  288. .PP
  289. .Vb 1
  290. \& keyUsage = digitalSignature, nonRepudiation
  291. \&
  292. \& keyUsage = critical, keyCertSign
  293. .Ve
  294. .SS "Extended Key Usage"
  295. .IX Subsection "Extended Key Usage"
  296. This extension consists of a list of values indicating purposes for which
  297. the certificate public key can be used.
  298. Each value can be either a short text name or an \s-1OID.\s0
  299. The following text names, and their intended meaning, are known:
  300. .PP
  301. .Vb 10
  302. \& Value Meaning according to RFC 5280 etc.
  303. \& \-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
  304. \& serverAuth SSL/TLS WWW Server Authentication
  305. \& clientAuth SSL/TLS WWW Client Authentication
  306. \& codeSigning Code Signing
  307. \& emailProtection E\-mail Protection (S/MIME)
  308. \& timeStamping Trusted Timestamping
  309. \& OCSPSigning OCSP Signing
  310. \& ipsecIKE ipsec Internet Key Exchange
  311. \& msCodeInd Microsoft Individual Code Signing (authenticode)
  312. \& msCodeCom Microsoft Commercial Code Signing (authenticode)
  313. \& msCTLSign Microsoft Trust List Signing
  314. \& msEFS Microsoft Encrypted File System
  315. .Ve
  316. .PP
  317. While \s-1IETF RFC 5280\s0 says that \fBid-kp-serverAuth\fR and \fBid-kp-clientAuth\fR
  318. are only for \s-1WWW\s0 use, in practice they are used for all kinds of \s-1TLS\s0 clients
  319. and servers, and this is what OpenSSL assumes as well.
  320. .PP
  321. Examples:
  322. .PP
  323. .Vb 1
  324. \& extendedKeyUsage = critical, codeSigning, 1.2.3.4
  325. \&
  326. \& extendedKeyUsage = serverAuth, clientAuth
  327. .Ve
  328. .SS "Subject Key Identifier"
  329. .IX Subsection "Subject Key Identifier"
  330. The \s-1SKID\s0 extension specification has a value with three choices.
  331. .IP "\fBnone\fR" 4
  332. .IX Item "none"
  333. No \s-1SKID\s0 extension will be included.
  334. .IP "\fBhash\fR" 4
  335. .IX Item "hash"
  336. The process specified in \s-1RFC 5280\s0 section 4.2.1.2. (1) is followed:
  337. The keyIdentifier is composed of the 160\-bit \s-1SHA\-1\s0 hash of the value of the \s-1BIT
  338. STRING\s0 subjectPublicKey (excluding the tag, length, and number of unused bits).
  339. .ie n .IP "A hex string (possibly with "":"" separating bytes)" 4
  340. .el .IP "A hex string (possibly with \f(CW:\fR separating bytes)" 4
  341. .IX Item "A hex string (possibly with : separating bytes)"
  342. The provided value is output directly.
  343. This choice is strongly discouraged.
  344. .PP
  345. By default the \fBx509\fR, \fBreq\fR, and \fBca\fR apps behave as if \fBhash\fR was given.
  346. .PP
  347. Example:
  348. .PP
  349. .Vb 1
  350. \& subjectKeyIdentifier = hash
  351. .Ve
  352. .SS "Authority Key Identifier"
  353. .IX Subsection "Authority Key Identifier"
  354. The \s-1AKID\s0 extension specification may have the value \fBnone\fR
  355. indicating that no \s-1AKID\s0 shall be included.
  356. Otherwise it may have the value \fBkeyid\fR or \fBissuer\fR
  357. or both of them, separated by \f(CW\*(C`,\*(C'\fR.
  358. Either or both can have the option \fBalways\fR,
  359. indicated by putting a colon \f(CW\*(C`:\*(C'\fR between the value and this option.
  360. For self-signed certificates the \s-1AKID\s0 is suppressed unless \fBalways\fR is present.
  361. .PP
  362. By default the \fBx509\fR, \fBreq\fR, and \fBca\fR apps behave as if \fBnone\fR was given
  363. for self-signed certificates and \fBkeyid\fR\f(CW\*(C`,\*(C'\fR \fBissuer\fR otherwise.
  364. .PP
  365. If \fBkeyid\fR is present, an attempt is made to
  366. copy the subject key identifier (\s-1SKID\s0) from the issuer certificate except if
  367. the issuer certificate is the same as the current one and it is not self-signed.
  368. The hash of the public key related to the signing key is taken as fallback
  369. if the issuer certificate is the same as the current certificate.
  370. If \fBalways\fR is present but no value can be obtained, an error is returned.
  371. .PP
  372. If \fBissuer\fR is present, and in addition it has the option \fBalways\fR specified
  373. or \fBkeyid\fR is not present,
  374. then the issuer \s-1DN\s0 and serial number are copied from the issuer certificate.
  375. If this fails, an error is returned.
  376. .PP
  377. Examples:
  378. .PP
  379. .Vb 1
  380. \& authorityKeyIdentifier = keyid, issuer
  381. \&
  382. \& authorityKeyIdentifier = keyid, issuer:always
  383. .Ve
  384. .SS "Subject Alternative Name"
  385. .IX Subsection "Subject Alternative Name"
  386. This is a multi-valued extension that supports several types of name
  387. identifier, including
  388. \&\fBemail\fR (an email address),
  389. \&\fB\s-1URI\s0\fR (a uniform resource indicator),
  390. \&\fB\s-1DNS\s0\fR (a \s-1DNS\s0 domain name),
  391. \&\fB\s-1RID\s0\fR (a registered \s-1ID: OBJECT IDENTIFIER\s0),
  392. \&\fB\s-1IP\s0\fR (an \s-1IP\s0 address),
  393. \&\fBdirName\fR (a distinguished name),
  394. and \fBotherName\fR.
  395. The syntax of each is described in the following paragraphs.
  396. .PP
  397. The \fBemail\fR option has two special values.
  398. \&\f(CW\*(C`copy\*(C'\fR will automatically include any email addresses
  399. contained in the certificate subject name in the extension.
  400. \&\f(CW\*(C`move\*(C'\fR will automatically move any email addresses
  401. from the certificate subject name to the extension.
  402. .PP
  403. The \s-1IP\s0 address used in the \fB\s-1IP\s0\fR option can be in either IPv4 or IPv6 format.
  404. .PP
  405. The value of \fBdirName\fR is specifies the configuration section containing
  406. the distinguished name to use, as a set of name-value pairs.
  407. Multi-valued AVAs can be formed by prefacing the name with a \fB+\fR character.
  408. .PP
  409. The value of \fBotherName\fR can include arbitrary data associated with an \s-1OID\s0;
  410. the value should be the \s-1OID\s0 followed by a semicolon and the content in specified
  411. using the syntax in \fBASN1_generate_nconf\fR\|(3).
  412. .PP
  413. Examples:
  414. .PP
  415. .Vb 1
  416. \& subjectAltName = email:copy, email:my@example.com, URI:http://my.example.com/
  417. \&
  418. \& subjectAltName = IP:192.168.7.1
  419. \&
  420. \& subjectAltName = IP:13::17
  421. \&
  422. \& subjectAltName = email:my@example.com, RID:1.2.3.4
  423. \&
  424. \& subjectAltName = otherName:1.2.3.4;UTF8:some other identifier
  425. \&
  426. \& [extensions]
  427. \& subjectAltName = dirName:dir_sect
  428. \&
  429. \& [dir_sect]
  430. \& C = UK
  431. \& O = My Organization
  432. \& OU = My Unit
  433. \& CN = My Name
  434. .Ve
  435. .PP
  436. Non-ASCII Email Address conforming the syntax defined in Section 3.3 of \s-1RFC 6531\s0
  437. are provided as otherName.SmtpUTF8Mailbox. According to \s-1RFC 8398,\s0 the email
  438. address should be provided as UTF8String. To enforce the valid representation in
  439. the certificate, the SmtpUTF8Mailbox should be provided as follows
  440. .PP
  441. .Vb 3
  442. \& subjectAltName=@alts
  443. \& [alts]
  444. \& otherName = 1.3.6.1.5.5.7.8.9;FORMAT:UTF8,UTF8String:nonasciiname.example.com
  445. .Ve
  446. .SS "Issuer Alternative Name"
  447. .IX Subsection "Issuer Alternative Name"
  448. This extension supports most of the options of subject alternative name;
  449. it does not support \fBemail:copy\fR.
  450. It also adds \fBissuer:copy\fR as an allowed value, which copies any subject
  451. alternative names from the issuer certificate, if possible.
  452. .PP
  453. Example:
  454. .PP
  455. .Vb 1
  456. \& issuerAltName = issuer:copy
  457. .Ve
  458. .SS "Authority Info Access"
  459. .IX Subsection "Authority Info Access"
  460. This extension gives details about how to retrieve information that
  461. related to the certificate that the \s-1CA\s0 makes available. The syntax is
  462. \&\fBaccess_id;location\fR, where \fBaccess_id\fR is an object identifier
  463. (although only a few values are well-known) and \fBlocation\fR has the same
  464. syntax as subject alternative name (except that \fBemail:copy\fR is not supported).
  465. .PP
  466. Possible values for access_id include \fB\s-1OCSP\s0\fR (\s-1OCSP\s0 responder),
  467. \&\fBcaIssuers\fR (\s-1CA\s0 Issuers),
  468. \&\fBad_timestamping\fR (\s-1AD\s0 Time Stamping),
  469. \&\fB\s-1AD_DVCS\s0\fR (ad dvcs),
  470. \&\fBcaRepository\fR (\s-1CA\s0 Repository).
  471. .PP
  472. Examples:
  473. .PP
  474. .Vb 1
  475. \& authorityInfoAccess = OCSP;URI:http://ocsp.example.com/,caIssuers;URI:http://myca.example.com/ca.cer
  476. \&
  477. \& authorityInfoAccess = OCSP;URI:http://ocsp.example.com/
  478. .Ve
  479. .SS "\s-1CRL\s0 distribution points"
  480. .IX Subsection "CRL distribution points"
  481. This is a multi-valued extension whose values can be either a name-value
  482. pair using the same form as subject alternative name or a single value
  483. specifying the section name containing all the distribution point values.
  484. .PP
  485. When a name-value pair is used, a DistributionPoint extension will
  486. be set with the given value as the fullName field as the distributionPoint
  487. value, and the reasons and cRLIssuer fields will be omitted.
  488. .PP
  489. When a single option is used, the value specifies the section, and that
  490. section can have the following items:
  491. .IP "fullname" 4
  492. .IX Item "fullname"
  493. The full name of the distribution point, in the same format as the subject
  494. alternative name.
  495. .IP "relativename" 4
  496. .IX Item "relativename"
  497. The value is taken as a distinguished name fragment that is set as the
  498. value of the nameRelativeToCRLIssuer field.
  499. .IP "CRLIssuer" 4
  500. .IX Item "CRLIssuer"
  501. The value must in the same format as the subject alternative name.
  502. .IP "reasons" 4
  503. .IX Item "reasons"
  504. A multi-value field that contains the reasons for revocation. The recognized
  505. values are: \f(CW\*(C`keyCompromise\*(C'\fR, \f(CW\*(C`CACompromise\*(C'\fR, \f(CW\*(C`affiliationChanged\*(C'\fR,
  506. \&\f(CW\*(C`superseded\*(C'\fR, \f(CW\*(C`cessationOfOperation\*(C'\fR, \f(CW\*(C`certificateHold\*(C'\fR,
  507. \&\f(CW\*(C`privilegeWithdrawn\*(C'\fR, and \f(CW\*(C`AACompromise\*(C'\fR.
  508. .PP
  509. Only one of \fBfullname\fR or \fBrelativename\fR should be specified.
  510. .PP
  511. Simple examples:
  512. .PP
  513. .Vb 1
  514. \& crlDistributionPoints = URI:http://example.com/myca.crl
  515. \&
  516. \& crlDistributionPoints = URI:http://example.com/myca.crl, URI:http://example.org/my.crl
  517. .Ve
  518. .PP
  519. Full distribution point example:
  520. .PP
  521. .Vb 2
  522. \& [extensions]
  523. \& crlDistributionPoints = crldp1_section
  524. \&
  525. \& [crldp1_section]
  526. \& fullname = URI:http://example.com/myca.crl
  527. \& CRLissuer = dirName:issuer_sect
  528. \& reasons = keyCompromise, CACompromise
  529. \&
  530. \& [issuer_sect]
  531. \& C = UK
  532. \& O = Organisation
  533. \& CN = Some Name
  534. .Ve
  535. .SS "Issuing Distribution Point"
  536. .IX Subsection "Issuing Distribution Point"
  537. This extension should only appear in CRLs. It is a multi-valued extension
  538. whose syntax is similar to the \*(L"section\*(R" pointed to by the \s-1CRL\s0 distribution
  539. points extension. The following names have meaning:
  540. .IP "fullname" 4
  541. .IX Item "fullname"
  542. The full name of the distribution point, in the same format as the subject
  543. alternative name.
  544. .IP "relativename" 4
  545. .IX Item "relativename"
  546. The value is taken as a distinguished name fragment that is set as the
  547. value of the nameRelativeToCRLIssuer field.
  548. .IP "onlysomereasons" 4
  549. .IX Item "onlysomereasons"
  550. A multi-value field that contains the reasons for revocation. The recognized
  551. values are: \f(CW\*(C`keyCompromise\*(C'\fR, \f(CW\*(C`CACompromise\*(C'\fR, \f(CW\*(C`affiliationChanged\*(C'\fR,
  552. \&\f(CW\*(C`superseded\*(C'\fR, \f(CW\*(C`cessationOfOperation\*(C'\fR, \f(CW\*(C`certificateHold\*(C'\fR,
  553. \&\f(CW\*(C`privilegeWithdrawn\*(C'\fR, and \f(CW\*(C`AACompromise\*(C'\fR.
  554. .IP "onlyuser, onlyCA, onlyAA, indirectCRL" 4
  555. .IX Item "onlyuser, onlyCA, onlyAA, indirectCRL"
  556. The value for each of these names is a boolean.
  557. .PP
  558. Example:
  559. .PP
  560. .Vb 2
  561. \& [extensions]
  562. \& issuingDistributionPoint = critical, @idp_section
  563. \&
  564. \& [idp_section]
  565. \& fullname = URI:http://example.com/myca.crl
  566. \& indirectCRL = TRUE
  567. \& onlysomereasons = keyCompromise, CACompromise
  568. .Ve
  569. .SS "Certificate Policies"
  570. .IX Subsection "Certificate Policies"
  571. This is a \fIraw\fR extension that supports all of the defined fields of the
  572. certificate extension.
  573. .PP
  574. Policies without qualifiers are specified by giving the \s-1OID.\s0
  575. Multiple policies are comma-separated. For example:
  576. .PP
  577. .Vb 1
  578. \& certificatePolicies = 1.2.4.5, 1.1.3.4
  579. .Ve
  580. .PP
  581. To include policy qualifiers, use the \*(L"@section\*(R" syntax to point to a
  582. section that specifies all the information.
  583. .PP
  584. The section referred to must include the policy \s-1OID\s0 using the name
  585. \&\fBpolicyIdentifier\fR. cPSuri qualifiers can be included using the syntax:
  586. .PP
  587. .Vb 1
  588. \& CPS.nnn = value
  589. .Ve
  590. .PP
  591. where \f(CW\*(C`nnn\*(C'\fR is a number.
  592. .PP
  593. userNotice qualifiers can be set using the syntax:
  594. .PP
  595. .Vb 1
  596. \& userNotice.nnn = @notice
  597. .Ve
  598. .PP
  599. The value of the userNotice qualifier is specified in the relevant section.
  600. This section can include \fBexplicitText\fR, \fBorganization\fR, and \fBnoticeNumbers\fR
  601. options. explicitText and organization are text strings, noticeNumbers is a
  602. comma separated list of numbers. The organization and noticeNumbers options
  603. (if included) must \s-1BOTH\s0 be present. Some software might require
  604. the \fBia5org\fR option at the top level; this changes the encoding from
  605. Displaytext to IA5String.
  606. .PP
  607. Example:
  608. .PP
  609. .Vb 2
  610. \& [extensions]
  611. \& certificatePolicies = ia5org, 1.2.3.4, 1.5.6.7.8, @polsect
  612. \&
  613. \& [polsect]
  614. \& policyIdentifier = 1.3.5.8
  615. \& CPS.1 = "http://my.host.example.com/"
  616. \& CPS.2 = "http://my.your.example.com/"
  617. \& userNotice.1 = @notice
  618. \&
  619. \& [notice]
  620. \& explicitText = "Explicit Text Here"
  621. \& organization = "Organisation Name"
  622. \& noticeNumbers = 1, 2, 3, 4
  623. .Ve
  624. .PP
  625. The character encoding of explicitText can be specified by prefixing the
  626. value with \fB\s-1UTF8\s0\fR, \fB\s-1BMP\s0\fR, or \fB\s-1VISIBLE\s0\fR followed by colon. For example:
  627. .PP
  628. .Vb 2
  629. \& [notice]
  630. \& explicitText = "UTF8:Explicit Text Here"
  631. .Ve
  632. .SS "Policy Constraints"
  633. .IX Subsection "Policy Constraints"
  634. This is a multi-valued extension which consisting of the names
  635. \&\fBrequireExplicitPolicy\fR or \fBinhibitPolicyMapping\fR and a non negative integer
  636. value. At least one component must be present.
  637. .PP
  638. Example:
  639. .PP
  640. .Vb 1
  641. \& policyConstraints = requireExplicitPolicy:3
  642. .Ve
  643. .SS "Inhibit Any Policy"
  644. .IX Subsection "Inhibit Any Policy"
  645. This is a string extension whose value must be a non negative integer.
  646. .PP
  647. Example:
  648. .PP
  649. .Vb 1
  650. \& inhibitAnyPolicy = 2
  651. .Ve
  652. .SS "Name Constraints"
  653. .IX Subsection "Name Constraints"
  654. This is a multi-valued extension. The name should
  655. begin with the word \fBpermitted\fR or \fBexcluded\fR followed by a \fB;\fR. The rest of
  656. the name and the value follows the syntax of subjectAltName except
  657. \&\fBemail:copy\fR
  658. is not supported and the \fB\s-1IP\s0\fR form should consist of an \s-1IP\s0 addresses and
  659. subnet mask separated by a \fB/\fR.
  660. .PP
  661. Examples:
  662. .PP
  663. .Vb 1
  664. \& nameConstraints = permitted;IP:192.168.0.0/255.255.0.0
  665. \&
  666. \& nameConstraints = permitted;email:.example.com
  667. \&
  668. \& nameConstraints = excluded;email:.com
  669. .Ve
  670. .SS "\s-1OCSP\s0 No Check"
  671. .IX Subsection "OCSP No Check"
  672. This is a string extension. It is parsed, but ignored.
  673. .PP
  674. Example:
  675. .PP
  676. .Vb 1
  677. \& noCheck = ignored
  678. .Ve
  679. .SS "\s-1TLS\s0 Feature (aka Must Staple)"
  680. .IX Subsection "TLS Feature (aka Must Staple)"
  681. This is a multi-valued extension consisting of a list of \s-1TLS\s0 extension
  682. identifiers. Each identifier may be a number (0..65535) or a supported name.
  683. When a \s-1TLS\s0 client sends a listed extension, the \s-1TLS\s0 server is expected to
  684. include that extension in its reply.
  685. .PP
  686. The supported names are: \fBstatus_request\fR and \fBstatus_request_v2\fR.
  687. .PP
  688. Example:
  689. .PP
  690. .Vb 1
  691. \& tlsfeature = status_request
  692. .Ve
  693. .SH "DEPRECATED EXTENSIONS"
  694. .IX Header "DEPRECATED EXTENSIONS"
  695. The following extensions are non standard, Netscape specific and largely
  696. obsolete. Their use in new applications is discouraged.
  697. .SS "Netscape String extensions"
  698. .IX Subsection "Netscape String extensions"
  699. Netscape Comment (\fBnsComment\fR) is a string extension containing a comment
  700. which will be displayed when the certificate is viewed in some browsers.
  701. Other extensions of this type are: \fBnsBaseUrl\fR,
  702. \&\fBnsRevocationUrl\fR, \fBnsCaRevocationUrl\fR, \fBnsRenewalUrl\fR, \fBnsCaPolicyUrl\fR
  703. and \fBnsSslServerName\fR.
  704. .SS "Netscape Certificate Type"
  705. .IX Subsection "Netscape Certificate Type"
  706. This is a multi-valued extensions which consists of a list of flags to be
  707. included. It was used to indicate the purposes for which a certificate could
  708. be used. The basicConstraints, keyUsage and extended key usage extensions are
  709. now used instead.
  710. .PP
  711. Acceptable values for nsCertType are: \fBclient\fR, \fBserver\fR, \fBemail\fR,
  712. \&\fBobjsign\fR, \fBreserved\fR, \fBsslCA\fR, \fBemailCA\fR, \fBobjCA\fR.
  713. .SH "ARBITRARY EXTENSIONS"
  714. .IX Header "ARBITRARY EXTENSIONS"
  715. If an extension is not supported by the OpenSSL code then it must be encoded
  716. using the arbitrary extension format. It is also possible to use the arbitrary
  717. format for supported extensions. Extreme care should be taken to ensure that
  718. the data is formatted correctly for the given extension type.
  719. .PP
  720. There are two ways to encode arbitrary extensions.
  721. .PP
  722. The first way is to use the word \s-1ASN1\s0 followed by the extension content
  723. using the same syntax as \fBASN1_generate_nconf\fR\|(3).
  724. For example:
  725. .PP
  726. .Vb 3
  727. \& [extensions]
  728. \& 1.2.3.4 = critical, ASN1:UTF8String:Some random data
  729. \& 1.2.3.4.1 = ASN1:SEQUENCE:seq_sect
  730. \&
  731. \& [seq_sect]
  732. \& field1 = UTF8:field1
  733. \& field2 = UTF8:field2
  734. .Ve
  735. .PP
  736. It is also possible to use the word \s-1DER\s0 to include the raw encoded data in any
  737. extension.
  738. .PP
  739. .Vb 2
  740. \& 1.2.3.4 = critical, DER:01:02:03:04
  741. \& 1.2.3.4.1 = DER:01020304
  742. .Ve
  743. .PP
  744. The value following \s-1DER\s0 is a hex dump of the \s-1DER\s0 encoding of the extension
  745. Any extension can be placed in this form to override the default behaviour.
  746. For example:
  747. .PP
  748. .Vb 1
  749. \& basicConstraints = critical, DER:00:01:02:03
  750. .Ve
  751. .SH "WARNINGS"
  752. .IX Header "WARNINGS"
  753. There is no guarantee that a specific implementation will process a given
  754. extension. It may therefore be sometimes possible to use certificates for
  755. purposes prohibited by their extensions because a specific application does
  756. not recognize or honour the values of the relevant extensions.
  757. .PP
  758. The \s-1DER\s0 and \s-1ASN1\s0 options should be used with caution. It is possible to create
  759. invalid extensions if they are not used carefully.
  760. .SH "SEE ALSO"
  761. .IX Header "SEE ALSO"
  762. \&\fBopenssl\-req\fR\|(1), \fBopenssl\-ca\fR\|(1), \fBopenssl\-x509\fR\|(1),
  763. \&\fBASN1_generate_nconf\fR\|(3)
  764. .SH "COPYRIGHT"
  765. .IX Header "COPYRIGHT"
  766. Copyright 2004\-2023 The OpenSSL Project Authors. All Rights Reserved.
  767. .PP
  768. Licensed under the Apache License 2.0 (the \*(L"License\*(R"). You may not use
  769. this file except in compliance with the License. You can obtain a copy
  770. in the file \s-1LICENSE\s0 in the source distribution or at
  771. <https://www.openssl.org/source/license.html>.