config.5ossl 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721
  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 "CONFIG 5ossl"
  136. .TH 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. config \- OpenSSL CONF library configuration files
  143. .SH "DESCRIPTION"
  144. .IX Header "DESCRIPTION"
  145. This page documents the syntax of OpenSSL configuration files,
  146. as parsed by \fBNCONF_load\fR\|(3) and related functions.
  147. This format is used by many of the OpenSSL commands, and to
  148. initialize the libraries when used by any application.
  149. .PP
  150. The first part describes the general syntax of the configuration
  151. files, and subsequent sections describe the semantics of individual
  152. modules. Other modules are described in \fBfips_config\fR\|(5) and
  153. \&\fBx509v3_config\fR\|(5).
  154. The syntax for defining \s-1ASN.1\s0 values is described in
  155. \&\fBASN1_generate_nconf\fR\|(3).
  156. .SH "SYNTAX"
  157. .IX Header "SYNTAX"
  158. A configuration file is a series of lines. Blank lines, and whitespace
  159. between the elements of a line, have no significance. A comment starts
  160. with a \fB#\fR character; the rest of the line is ignored. If the \fB#\fR
  161. is the first non-space character in a line, the entire line is ignored.
  162. .SS "Directives"
  163. .IX Subsection "Directives"
  164. Two directives can be used to control the parsing of configuration files:
  165. \&\fB.include\fR and \fB.pragma\fR.
  166. .PP
  167. For compatibility with older versions of OpenSSL, an equal sign after the
  168. directive will be ignored. Older versions will treat it as an assignment,
  169. so care should be taken if the difference in semantics is important.
  170. .PP
  171. A file can include other files using the include syntax:
  172. .PP
  173. .Vb 1
  174. \& .include [=] pathname
  175. .Ve
  176. .PP
  177. If \fBpathname\fR is a simple filename, that file is included directly at
  178. that point. Included files can have \fB.include\fR statements that specify
  179. other files. If \fBpathname\fR is a directory, all files within that directory
  180. that have a \f(CW\*(C`.cnf\*(C'\fR or \f(CW\*(C`.conf\*(C'\fR extension will be included. (This is only
  181. available on systems with \s-1POSIX IO\s0 support.) Any sub-directories found
  182. inside the \fBpathname\fR are \fBignored\fR. Similarly, if a file is opened
  183. while scanning a directory, and that file has an \fB.include\fR directive
  184. that specifies a directory, that is also ignored.
  185. .PP
  186. As a general rule, the \fBpathname\fR should be an absolute path; this can
  187. be enforced with the \fBabspath\fR and \fBincludedir\fR pragmas, described below.
  188. The environment variable \fB\s-1OPENSSL_CONF_INCLUDE\s0\fR, if it exists,
  189. is prepended to all relative pathnames.
  190. If the pathname is still relative, it is interpreted based on the
  191. current working directory.
  192. .PP
  193. To require all file inclusions to name absolute paths, use the following
  194. directive:
  195. .PP
  196. .Vb 1
  197. \& .pragma [=] abspath:value
  198. .Ve
  199. .PP
  200. The default behavior, where the \fBvalue\fR is \fBfalse\fR or \fBoff\fR, is to allow
  201. relative paths. To require all \fB.include\fR pathnames to be absolute paths,
  202. use a \fBvalue\fR of \fBtrue\fR or \fBon\fR.
  203. .PP
  204. In these files, the dollar sign, \fB$\fR, is used to reference a variable, as
  205. described below. On some platforms, however, it is common to treat \fB$\fR
  206. as a regular character in symbol names. Supporting this behavior can be
  207. done with the following directive:
  208. .PP
  209. .Vb 1
  210. \& .pragma [=] dollarid:value
  211. .Ve
  212. .PP
  213. The default behavior, where the \fBvalue\fR is \fBfalse\fR or \fBoff\fR, is to treat
  214. the dollarsign as indicating a variable name; \f(CW\*(C`foo$bar\*(C'\fR is interpreted as
  215. \&\f(CW\*(C`foo\*(C'\fR followed by the expansion of the variable \f(CW\*(C`bar\*(C'\fR. If \fBvalue\fR is
  216. \&\fBtrue\fR or \fBon\fR, then \f(CW\*(C`foo$bar\*(C'\fR is a single seven-character name and
  217. variable expansions must be specified using braces or parentheses.
  218. .PP
  219. .Vb 1
  220. \& .pragma [=] includedir:value
  221. .Ve
  222. .PP
  223. If a relative pathname is specified in the \fB.include\fR directive, and
  224. the \fB\s-1OPENSSL_CONF_INCLUDE\s0\fR environment variable doesn't exist, then
  225. the value of the \fBincludedir\fR pragma, if it exists, is prepended to the
  226. pathname.
  227. .SS "Settings"
  228. .IX Subsection "Settings"
  229. A configuration file is divided into a number of \fIsections\fR. A section
  230. begins with the section name in square brackets, and ends when a new
  231. section starts, or at the end of the file. The section name can consist
  232. of alphanumeric characters and underscores.
  233. Whitespace between the name and the brackets is removed.
  234. .PP
  235. The first section of a configuration file is special and is referred to
  236. as the \fBdefault\fR section. This section is usually unnamed and spans from
  237. the start of file until the first named section. When a name is being
  238. looked up, it is first looked up in the current or named section,
  239. and then the default section if necessary.
  240. .PP
  241. The environment is mapped onto a section called \fB\s-1ENV\s0\fR.
  242. .PP
  243. Within a section are a series of name/value assignments, described in more
  244. detail below. As a reminder, the square brackets shown in this example
  245. are required, not optional:
  246. .PP
  247. .Vb 7
  248. \& [ section ]
  249. \& name1 = This is value1
  250. \& name2 = Another value
  251. \& ...
  252. \& [ newsection ]
  253. \& name1 = New value1
  254. \& name3 = Value 3
  255. .Ve
  256. .PP
  257. The \fBname\fR can contain any alphanumeric characters as well as a few
  258. punctuation symbols such as \fB.\fR \fB,\fR \fB;\fR and \fB_\fR.
  259. Whitespace after the name and before the equal sign is ignored.
  260. .PP
  261. If a name is repeated in the same section, then all but the last
  262. value are ignored. In certain circumstances, such as with
  263. Certificate DNs, the same field may occur multiple times.
  264. In order to support this, commands like \fBopenssl\-req\fR\|(1) ignore any
  265. leading text that is preceded with a period. For example:
  266. .PP
  267. .Vb 2
  268. \& 1.OU = First OU
  269. \& 2.OU = Second OU
  270. .Ve
  271. .PP
  272. The \fBvalue\fR consists of the string following the \fB=\fR character until end
  273. of line with any leading and trailing whitespace removed.
  274. .PP
  275. The value string undergoes variable expansion. The text \f(CW$var\fR or \f(CW\*(C`${var}\*(C'\fR
  276. inserts the value of the named variable from the current section.
  277. To use a value from another section use \f(CW$section::name\fR
  278. or \f(CW\*(C`${section::name}\*(C'\fR.
  279. By using \f(CW$ENV::name\fR, the value of the specified environment
  280. variable will be substituted.
  281. .PP
  282. Variables must be defined before their value is referenced, otherwise
  283. an error is flagged and the file will not load.
  284. This can be worked around by specifying a default value in the \fBdefault\fR
  285. section before the variable is used.
  286. .PP
  287. Any name/value settings in an \fB\s-1ENV\s0\fR section are available
  288. to the configuration file, but are not propagated to the environment.
  289. .PP
  290. It is an error if the value ends up longer than 64k.
  291. .PP
  292. It is possible to escape certain characters by using a single \fB'\fR or
  293. double \fB"\fR quote around the value, or using a backslash \fB\e\fR before the
  294. character,
  295. By making the last character of a line a \fB\e\fR
  296. a \fBvalue\fR string can be spread across multiple lines. In addition
  297. the sequences \fB\en\fR, \fB\er\fR, \fB\eb\fR and \fB\et\fR are recognized.
  298. .PP
  299. The expansion and escape rules as described above that apply to \fBvalue\fR
  300. also apply to the pathname of the \fB.include\fR directive.
  301. .SH "OPENSSL LIBRARY CONFIGURATION"
  302. .IX Header "OPENSSL LIBRARY CONFIGURATION"
  303. The sections below use the informal term \fImodule\fR to refer to a part
  304. of the OpenSSL functionality. This is not the same as the formal term
  305. \&\fI\s-1FIPS\s0 module\fR, for example.
  306. .PP
  307. The OpenSSL configuration looks up the value of \fBopenssl_conf\fR
  308. in the default section and takes that as the name of a section that specifies
  309. how to configure any modules in the library. It is not an error to leave
  310. any module in its default configuration. An application can specify a
  311. different name by calling \fBCONF_modules_load_file()\fR, for example, directly.
  312. .PP
  313. OpenSSL also looks up the value of \fBconfig_diagnostics\fR.
  314. If this exists and has a nonzero numeric value, any error suppressing flags
  315. passed to \fBCONF_modules_load()\fR will be ignored.
  316. This is useful for diagnosing misconfigurations but its use in
  317. production requires additional consideration. With this option enabled,
  318. a configuration error will completely prevent access to a service.
  319. Without this option and in the presence of a configuration error, access
  320. will be allowed but the desired configuration will \fBnot\fR be used.
  321. .PP
  322. .Vb 3
  323. \& # These must be in the default section
  324. \& config_diagnostics = 1
  325. \& openssl_conf = openssl_init
  326. \&
  327. \& [openssl_init]
  328. \& oid_section = oids
  329. \& providers = providers
  330. \& alg_section = evp_properties
  331. \& ssl_conf = ssl_configuration
  332. \& engines = engines
  333. \& random = random
  334. \&
  335. \& [oids]
  336. \& ... new oids here ...
  337. \&
  338. \& [providers]
  339. \& ... provider stuff here ...
  340. \&
  341. \& [evp_properties]
  342. \& ... EVP properties here ...
  343. \&
  344. \& [ssl_configuration]
  345. \& ... SSL/TLS configuration properties here ...
  346. \&
  347. \& [engines]
  348. \& ... engine properties here ...
  349. \&
  350. \& [random]
  351. \& ... random properties here ...
  352. .Ve
  353. .PP
  354. The semantics of each module are described below. The phrase \*(L"in the
  355. initialization section\*(R" refers to the section identified by the
  356. \&\fBopenssl_conf\fR or other name (given as \fBopenssl_init\fR in the
  357. example above). The examples below assume the configuration above
  358. is used to specify the individual sections.
  359. .SS "\s-1ASN.1\s0 Object Identifier Configuration"
  360. .IX Subsection "ASN.1 Object Identifier Configuration"
  361. The name \fBoid_section\fR in the initialization section names the section
  362. containing name/value pairs of \s-1OID\s0's.
  363. The name is the short name; the value is an optional long name followed
  364. by a comma, and the numeric value.
  365. While some OpenSSL commands have their own section for specifying \s-1OID\s0's,
  366. this section makes them available to all commands and applications.
  367. .PP
  368. .Vb 4
  369. \& [oids]
  370. \& shortName = a very long OID name, 1.2.3.4
  371. \& newoid1 = 1.2.3.4.1
  372. \& some_other_oid = 1.2.3.5
  373. .Ve
  374. .PP
  375. If a full configuration with the above fragment is in the file
  376. \&\fIexample.cnf\fR, then the following command line:
  377. .PP
  378. .Vb 1
  379. \& OPENSSL_CONF=example.cnf openssl asn1parse \-genstr OID:1.2.3.4.1
  380. .Ve
  381. .PP
  382. will output:
  383. .PP
  384. .Vb 1
  385. \& 0:d=0 hl=2 l= 4 prim: OBJECT :newoid1
  386. .Ve
  387. .PP
  388. showing that the \s-1OID\s0 \*(L"newoid1\*(R" has been added as \*(L"1.2.3.4.1\*(R".
  389. .SS "Provider Configuration"
  390. .IX Subsection "Provider Configuration"
  391. The name \fBproviders\fR in the initialization section names the section
  392. containing cryptographic provider configuration. The name/value assignments
  393. in this section each name a provider, and point to the configuration section
  394. for that provider. The provider-specific section is used to specify how
  395. to load the module, activate it, and set other parameters.
  396. .PP
  397. Within a provider section, the following names have meaning:
  398. .IP "\fBidentity\fR" 4
  399. .IX Item "identity"
  400. This is used to specify an alternate name, overriding the default name
  401. specified in the list of providers. For example:
  402. .Sp
  403. .Vb 2
  404. \& [providers]
  405. \& foo = foo_provider
  406. \&
  407. \& [foo_provider]
  408. \& identity = my_fips_module
  409. .Ve
  410. .IP "\fBmodule\fR" 4
  411. .IX Item "module"
  412. Specifies the pathname of the module (typically a shared library) to load.
  413. .IP "\fBactivate\fR" 4
  414. .IX Item "activate"
  415. If present and set to one of the values yes, on, true or 1, then the associated
  416. provider will be activated. Conversely, setting this value to no, off, false, or
  417. 0 will prevent the provider from being activated. Settings can be given in lower
  418. or uppercase. Setting activate to any other setting, or omitting a setting
  419. value will result in an error.
  420. .Sp
  421. = item \fBsoft_load\fR
  422. .Sp
  423. If enabled, informs the library to clear the error stack on failure to activate
  424. requested provider. A value of 1, yes, true or on (in lower or uppercase) will
  425. activate this setting, while a value of 0, no, false, of off (again in lower or
  426. uppercase) will disable this setting. Any other value will produce an error.
  427. Note this setting defaults to off if not provided
  428. .PP
  429. All parameters in the section as well as sub-sections are made
  430. available to the provider.
  431. .PP
  432. \fIDefault provider and its activation\fR
  433. .IX Subsection "Default provider and its activation"
  434. .PP
  435. If no providers are activated explicitly, the default one is activated implicitly.
  436. See \fBOSSL_PROVIDER\-default\fR\|(7) for more details.
  437. .PP
  438. If you add a section explicitly activating any other provider(s),
  439. you most probably need to explicitly activate the default provider,
  440. otherwise it becomes unavailable in openssl. It may make the system remotely unavailable.
  441. .SS "\s-1EVP\s0 Configuration"
  442. .IX Subsection "EVP Configuration"
  443. The name \fBalg_section\fR in the initialization section names the section
  444. containing algorithmic properties when using the \fB\s-1EVP\s0\fR \s-1API.\s0
  445. .PP
  446. Within the algorithm properties section, the following names have meaning:
  447. .IP "\fBdefault_properties\fR" 4
  448. .IX Item "default_properties"
  449. The value may be anything that is acceptable as a property query
  450. string for \fBEVP_set_default_properties()\fR.
  451. .IP "\fBfips_mode\fR (deprecated)" 4
  452. .IX Item "fips_mode (deprecated)"
  453. The value is a boolean that can be \fByes\fR or \fBno\fR. If the value is
  454. \&\fByes\fR, this is exactly equivalent to:
  455. .Sp
  456. .Vb 1
  457. \& default_properties = fips=yes
  458. .Ve
  459. .Sp
  460. If the value is \fBno\fR, nothing happens. Using this name is deprecated, and
  461. if used, it must be the only name in the section.
  462. .SS "\s-1SSL\s0 Configuration"
  463. .IX Subsection "SSL Configuration"
  464. The name \fBssl_conf\fR in the initialization section names the section
  465. containing the list of \s-1SSL/TLS\s0 configurations.
  466. As with the providers, each name in this section identifies a
  467. section with the configuration for that name. For example:
  468. .PP
  469. .Vb 4
  470. \& [ssl_configuration]
  471. \& server = server_tls_config
  472. \& client = client_tls_config
  473. \& system_default = tls_system_default
  474. \&
  475. \& [server_tls_config]
  476. \& ... configuration for SSL/TLS servers ...
  477. \&
  478. \& [client_tls_config]
  479. \& ... configuration for SSL/TLS clients ...
  480. .Ve
  481. .PP
  482. The configuration name \fBsystem_default\fR has a special meaning. If it
  483. exists, it is applied whenever an \fB\s-1SSL_CTX\s0\fR object is created. For example,
  484. to impose system-wide minimum \s-1TLS\s0 and \s-1DTLS\s0 protocol versions:
  485. .PP
  486. .Vb 3
  487. \& [tls_system_default]
  488. \& MinProtocol = TLSv1.2
  489. \& MinProtocol = DTLSv1.2
  490. .Ve
  491. .PP
  492. The minimum \s-1TLS\s0 protocol is applied to \fB\s-1SSL_CTX\s0\fR objects that are TLS-based,
  493. and the minimum \s-1DTLS\s0 protocol to those are DTLS-based.
  494. The same applies also to maximum versions set with \fBMaxProtocol\fR.
  495. .PP
  496. Each configuration section consists of name/value pairs that are parsed
  497. by \fB\fBSSL_CONF_cmd\fB\|(3)\fR, which will be called by \fBSSL_CTX_config()\fR or
  498. \&\fBSSL_config()\fR, appropriately. Note that any characters before an initial
  499. dot in the configuration section are ignored, so that the same command can
  500. be used multiple times. This probably is most useful for loading different
  501. key types, as shown here:
  502. .PP
  503. .Vb 3
  504. \& [server_tls_config]
  505. \& RSA.Certificate = server\-rsa.pem
  506. \& ECDSA.Certificate = server\-ecdsa.pem
  507. .Ve
  508. .SS "Engine Configuration"
  509. .IX Subsection "Engine Configuration"
  510. The name \fBengines\fR in the initialization section names the section
  511. containing the list of \s-1ENGINE\s0 configurations.
  512. As with the providers, each name in this section identifies an engine
  513. with the configuration for that engine.
  514. The engine-specific section is used to specify how to load the engine,
  515. activate it, and set other parameters.
  516. .PP
  517. Within an engine section, the following names have meaning:
  518. .IP "\fBengine_id\fR" 4
  519. .IX Item "engine_id"
  520. This is used to specify an alternate name, overriding the default name
  521. specified in the list of engines. If present, it must be first.
  522. For example:
  523. .Sp
  524. .Vb 2
  525. \& [engines]
  526. \& foo = foo_engine
  527. \&
  528. \& [foo_engine]
  529. \& engine_id = myfoo
  530. .Ve
  531. .IP "\fBdynamic_path\fR" 4
  532. .IX Item "dynamic_path"
  533. This loads and adds an \s-1ENGINE\s0 from the given path. It is equivalent to
  534. sending the ctrls \fB\s-1SO_PATH\s0\fR with the path argument followed by \fB\s-1LIST_ADD\s0\fR
  535. with value \fB2\fR and \fB\s-1LOAD\s0\fR to the dynamic \s-1ENGINE.\s0 If this is not the
  536. required behaviour then alternative ctrls can be sent directly to the
  537. dynamic \s-1ENGINE\s0 using ctrl commands.
  538. .IP "\fBinit\fR" 4
  539. .IX Item "init"
  540. This specifies whether to initialize the \s-1ENGINE.\s0 If the value is \fB0\fR the
  541. \&\s-1ENGINE\s0 will not be initialized, if the value is \fB1\fR an attempt is made
  542. to initialize
  543. the \s-1ENGINE\s0 immediately. If the \fBinit\fR command is not present then an
  544. attempt will be made to initialize the \s-1ENGINE\s0 after all commands in its
  545. section have been processed.
  546. .IP "\fBdefault_algorithms\fR" 4
  547. .IX Item "default_algorithms"
  548. This sets the default algorithms an \s-1ENGINE\s0 will supply using the function
  549. \&\fBENGINE_set_default_string()\fR.
  550. .PP
  551. All other names are taken to be the name of a ctrl command that is
  552. sent to the \s-1ENGINE,\s0 and the value is the argument passed with the command.
  553. The special value \fB\s-1EMPTY\s0\fR means no value is sent with the command.
  554. For example:
  555. .PP
  556. .Vb 2
  557. \& [engines]
  558. \& foo = foo_engine
  559. \&
  560. \& [foo_engine]
  561. \& dynamic_path = /some/path/fooengine.so
  562. \& some_ctrl = some_value
  563. \& default_algorithms = ALL
  564. \& other_ctrl = EMPTY
  565. .Ve
  566. .SS "Random Configuration"
  567. .IX Subsection "Random Configuration"
  568. The name \fBrandom\fR in the initialization section names the section
  569. containing the random number generator settings.
  570. .PP
  571. Within the random section, the following names have meaning:
  572. .IP "\fBrandom\fR" 4
  573. .IX Item "random"
  574. This is used to specify the random bit generator.
  575. For example:
  576. .Sp
  577. .Vb 2
  578. \& [random]
  579. \& random = CTR\-DRBG
  580. .Ve
  581. .Sp
  582. The available random bit generators are:
  583. .RS 4
  584. .IP "\fBCTR-DRBG\fR" 4
  585. .IX Item "CTR-DRBG"
  586. .PD 0
  587. .IP "\fBHASH-DRBG\fR" 4
  588. .IX Item "HASH-DRBG"
  589. .IP "\fBHMAC-DRBG\fR" 4
  590. .IX Item "HMAC-DRBG"
  591. .RE
  592. .RS 4
  593. .RE
  594. .IP "\fBcipher\fR" 4
  595. .IX Item "cipher"
  596. .PD
  597. This specifies what cipher a \fBCTR-DRBG\fR random bit generator will use.
  598. Other random bit generators ignore this name.
  599. The default value is \fB\s-1AES\-256\-CTR\s0\fR.
  600. .IP "\fBdigest\fR" 4
  601. .IX Item "digest"
  602. This specifies what digest the \fBHASH-DRBG\fR or \fBHMAC-DRBG\fR random bit
  603. generators will use. Other random bit generators ignore this name.
  604. .IP "\fBproperties\fR" 4
  605. .IX Item "properties"
  606. This sets the property query used when fetching the random bit generator and
  607. any underlying algorithms.
  608. .IP "\fBseed\fR" 4
  609. .IX Item "seed"
  610. This sets the randomness source that should be used. By default \fBSEED-SRC\fR
  611. will be used outside of the \s-1FIPS\s0 provider. The \s-1FIPS\s0 provider uses call backs
  612. to access the same randomness sources from outside the validated boundary.
  613. .IP "\fBseed_properties\fR" 4
  614. .IX Item "seed_properties"
  615. This sets the property query used when fetching the randomness source.
  616. .SH "EXAMPLES"
  617. .IX Header "EXAMPLES"
  618. This example shows how to use quoting and escaping.
  619. .PP
  620. .Vb 3
  621. \& # This is the default section.
  622. \& HOME = /temp
  623. \& configdir = $ENV::HOME/config
  624. \&
  625. \& [ section_one ]
  626. \& # Quotes permit leading and trailing whitespace
  627. \& any = " any variable name "
  628. \& other = A string that can \e
  629. \& cover several lines \e
  630. \& by including \e\e characters
  631. \& message = Hello World\en
  632. \&
  633. \& [ section_two ]
  634. \& greeting = $section_one::message
  635. .Ve
  636. .PP
  637. This example shows how to expand environment variables safely.
  638. In this example, the variable \fBtempfile\fR is intended to refer
  639. to a temporary file, and the environment variable \fB\s-1TEMP\s0\fR or
  640. \&\fB\s-1TMP\s0\fR, if present, specify the directory where the file
  641. should be put.
  642. Since the default section is checked if a variable does not
  643. exist, it is possible to set \fB\s-1TMP\s0\fR to default to \fI/tmp\fR, and
  644. \&\fB\s-1TEMP\s0\fR to default to \fB\s-1TMP\s0\fR.
  645. .PP
  646. .Vb 3
  647. \& # These two lines must be in the default section.
  648. \& TMP = /tmp
  649. \& TEMP = $ENV::TMP
  650. \&
  651. \& # This can be used anywhere
  652. \& tmpfile = ${ENV::TEMP}/tmp.filename
  653. .Ve
  654. .PP
  655. This example shows how to enforce \s-1FIPS\s0 mode for the application
  656. \&\fIsample\fR.
  657. .PP
  658. .Vb 1
  659. \& sample = fips_config
  660. \&
  661. \& [fips_config]
  662. \& alg_section = evp_properties
  663. \&
  664. \& [evp_properties]
  665. \& default_properties = "fips=yes"
  666. .Ve
  667. .SH "ENVIRONMENT"
  668. .IX Header "ENVIRONMENT"
  669. .IP "\fB\s-1OPENSSL_CONF\s0\fR" 4
  670. .IX Item "OPENSSL_CONF"
  671. The path to the config file, or the empty string for none.
  672. Ignored in set-user-ID and set-group-ID programs.
  673. .IP "\fB\s-1OPENSSL_ENGINES\s0\fR" 4
  674. .IX Item "OPENSSL_ENGINES"
  675. The path to the engines directory.
  676. Ignored in set-user-ID and set-group-ID programs.
  677. .IP "\fB\s-1OPENSSL_MODULES\s0\fR" 4
  678. .IX Item "OPENSSL_MODULES"
  679. The path to the directory with OpenSSL modules, such as providers.
  680. Ignored in set-user-ID and set-group-ID programs.
  681. .IP "\fB\s-1OPENSSL_CONF_INCLUDE\s0\fR" 4
  682. .IX Item "OPENSSL_CONF_INCLUDE"
  683. The optional path to prepend to all \fB.include\fR paths.
  684. .SH "BUGS"
  685. .IX Header "BUGS"
  686. There is no way to include characters using the octal \fB\ennn\fR form. Strings
  687. are all null terminated so nulls cannot form part of the value.
  688. .PP
  689. The escaping isn't quite right: if you want to use sequences like \fB\en\fR
  690. you can't use any quote escaping on the same line.
  691. .PP
  692. The limit that only one directory can be opened and read at a time
  693. can be considered a bug and should be fixed.
  694. .SH "HISTORY"
  695. .IX Header "HISTORY"
  696. An undocumented \s-1API, \fBNCONF_WIN32\s0()\fR, used a slightly different set
  697. of parsing rules there were intended to be tailored to
  698. the Microsoft Windows platform.
  699. Specifically, the backslash character was not an escape character and
  700. could be used in pathnames, only the double-quote character was recognized,
  701. and comments began with a semi-colon.
  702. This function was deprecated in OpenSSL 3.0; applications with
  703. configuration files using that syntax will have to be modified.
  704. .SH "SEE ALSO"
  705. .IX Header "SEE ALSO"
  706. \&\fBopenssl\-x509\fR\|(1), \fBopenssl\-req\fR\|(1), \fBopenssl\-ca\fR\|(1),
  707. \&\fBopenssl\-fipsinstall\fR\|(1),
  708. \&\fBASN1_generate_nconf\fR\|(3),
  709. \&\fBEVP_set_default_properties\fR\|(3),
  710. \&\fBCONF_modules_load\fR\|(3),
  711. \&\fBCONF_modules_load_file\fR\|(3),
  712. \&\fBfips_config\fR\|(5), and
  713. \&\fBx509v3_config\fR\|(5).
  714. .SH "COPYRIGHT"
  715. .IX Header "COPYRIGHT"
  716. Copyright 2000\-2023 The OpenSSL Project Authors. All Rights Reserved.
  717. .PP
  718. Licensed under the Apache License 2.0 (the \*(L"License\*(R"). You may not use
  719. this file except in compliance with the License. You can obtain a copy
  720. in the file \s-1LICENSE\s0 in the source distribution or at
  721. <https://www.openssl.org/source/license.html>.