SSL_CONF_cmd.3ossl 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884
  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 "SSL_CONF_CMD 3ossl"
  136. .TH SSL_CONF_CMD 3ossl "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. SSL_CONF_cmd_value_type,
  143. SSL_CONF_cmd \- send configuration command
  144. .SH "SYNOPSIS"
  145. .IX Header "SYNOPSIS"
  146. .Vb 1
  147. \& #include <openssl/ssl.h>
  148. \&
  149. \& int SSL_CONF_cmd(SSL_CONF_CTX *ctx, const char *option, const char *value);
  150. \& int SSL_CONF_cmd_value_type(SSL_CONF_CTX *ctx, const char *option);
  151. .Ve
  152. .SH "DESCRIPTION"
  153. .IX Header "DESCRIPTION"
  154. The function \fBSSL_CONF_cmd()\fR performs configuration operation \fBoption\fR with
  155. optional parameter \fBvalue\fR on \fBctx\fR. Its purpose is to simplify application
  156. configuration of \fB\s-1SSL_CTX\s0\fR or \fB\s-1SSL\s0\fR structures by providing a common
  157. framework for command line options or configuration files.
  158. .PP
  159. \&\fBSSL_CONF_cmd_value_type()\fR returns the type of value that \fBoption\fR refers to.
  160. .SH "SUPPORTED COMMAND LINE COMMANDS"
  161. .IX Header "SUPPORTED COMMAND LINE COMMANDS"
  162. Currently supported \fBoption\fR names for command lines (i.e. when the
  163. flag \fB\s-1SSL_CONF_FLAG_CMDLINE\s0\fR is set) are listed below. Note: all \fBoption\fR
  164. names are case sensitive. Unless otherwise stated commands can be used by
  165. both clients and servers and the \fBvalue\fR parameter is not used. The default
  166. prefix for command line commands is \fB\-\fR and that is reflected below.
  167. .IP "\fB\-bugs\fR" 4
  168. .IX Item "-bugs"
  169. Various bug workarounds are set, same as setting \fB\s-1SSL_OP_ALL\s0\fR.
  170. .IP "\fB\-no_comp\fR" 4
  171. .IX Item "-no_comp"
  172. Disables support for \s-1SSL/TLS\s0 compression, same as setting
  173. \&\fB\s-1SSL_OP_NO_COMPRESSION\s0\fR.
  174. As of OpenSSL 1.1.0, compression is off by default.
  175. .IP "\fB\-comp\fR" 4
  176. .IX Item "-comp"
  177. Enables support for \s-1SSL/TLS\s0 compression, same as clearing
  178. \&\fB\s-1SSL_OP_NO_COMPRESSION\s0\fR.
  179. This command was introduced in OpenSSL 1.1.0.
  180. As of OpenSSL 1.1.0, compression is off by default. \s-1TLS\s0 compression can only be
  181. used in security level 1 or lower. From OpenSSL 3.2.0 and above the default
  182. security level is 2, so this option will have no effect without also changing
  183. the security level. See \fBSSL_CTX_set_security_level\fR\|(3).
  184. .IP "\fB\-no_ticket\fR" 4
  185. .IX Item "-no_ticket"
  186. Disables support for session tickets, same as setting \fB\s-1SSL_OP_NO_TICKET\s0\fR.
  187. .IP "\fB\-serverpref\fR" 4
  188. .IX Item "-serverpref"
  189. Use server and not client preference order when determining which cipher suite,
  190. signature algorithm or elliptic curve to use for an incoming connection.
  191. Equivalent to \fB\s-1SSL_OP_CIPHER_SERVER_PREFERENCE\s0\fR. Only used by servers.
  192. .IP "\fB\-client_renegotiation\fR" 4
  193. .IX Item "-client_renegotiation"
  194. Allows servers to accept client-initiated renegotiation. Equivalent to
  195. setting \fB\s-1SSL_OP_ALLOW_CLIENT_RENEGOTIATION\s0\fR.
  196. Only used by servers.
  197. .IP "\fB\-legacy_renegotiation\fR" 4
  198. .IX Item "-legacy_renegotiation"
  199. Permits the use of unsafe legacy renegotiation. Equivalent to setting
  200. \&\fB\s-1SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION\s0\fR.
  201. .IP "\fB\-no_renegotiation\fR" 4
  202. .IX Item "-no_renegotiation"
  203. Disables all attempts at renegotiation in TLSv1.2 and earlier, same as setting
  204. \&\fB\s-1SSL_OP_NO_RENEGOTIATION\s0\fR.
  205. .IP "\fB\-no_resumption_on_reneg\fR" 4
  206. .IX Item "-no_resumption_on_reneg"
  207. Sets \fB\s-1SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION\s0\fR. Only used by servers.
  208. .IP "\fB\-legacy_server_connect\fR, \fB\-no_legacy_server_connect\fR" 4
  209. .IX Item "-legacy_server_connect, -no_legacy_server_connect"
  210. Permits or prohibits the use of unsafe legacy renegotiation for OpenSSL
  211. clients only. Equivalent to setting or clearing \fB\s-1SSL_OP_LEGACY_SERVER_CONNECT\s0\fR.
  212. .IP "\fB\-prioritize_chacha\fR" 4
  213. .IX Item "-prioritize_chacha"
  214. Prioritize ChaCha ciphers when the client has a ChaCha20 cipher at the top of
  215. its preference list. This usually indicates a client without \s-1AES\s0 hardware
  216. acceleration (e.g. mobile) is in use. Equivalent to \fB\s-1SSL_OP_PRIORITIZE_CHACHA\s0\fR.
  217. Only used by servers. Requires \fB\-serverpref\fR.
  218. .IP "\fB\-allow_no_dhe_kex\fR" 4
  219. .IX Item "-allow_no_dhe_kex"
  220. In TLSv1.3 allow a non\-(ec)dhe based key exchange mode on resumption. This means
  221. that there will be no forward secrecy for the resumed session.
  222. .IP "\fB\-prefer_no_dhe_kex\fR" 4
  223. .IX Item "-prefer_no_dhe_kex"
  224. In TLSv1.3, on resumption let the server prefer a non\-(ec)dhe based key
  225. exchange mode over an (ec)dhe based one. Requires \fB\-allow_no_dhe_kex\fR.
  226. Equivalent to \fB\s-1SSL_OP_PREFER_NO_DHE_KEX\s0\fR. Only used by servers.
  227. .IP "\fB\-strict\fR" 4
  228. .IX Item "-strict"
  229. Enables strict mode protocol handling. Equivalent to setting
  230. \&\fB\s-1SSL_CERT_FLAG_TLS_STRICT\s0\fR.
  231. .IP "\fB\-sigalgs\fR \fIalgs\fR" 4
  232. .IX Item "-sigalgs algs"
  233. This sets the supported signature algorithms for TLSv1.2 and TLSv1.3.
  234. For clients this value is used directly for the supported signature
  235. algorithms extension. For servers it is used to determine which signature
  236. algorithms to support.
  237. .Sp
  238. The \fBalgs\fR argument should be a colon separated list of signature
  239. algorithms in order of decreasing preference of the form \fBalgorithm+hash\fR
  240. or \fBsignature_scheme\fR. For the default providers shipped with OpenSSL,
  241. \&\fBalgorithm\fR is one of \fB\s-1RSA\s0\fR, \fB\s-1DSA\s0\fR or \fB\s-1ECDSA\s0\fR and
  242. \&\fBhash\fR is a supported algorithm \s-1OID\s0 short name such as \fB\s-1SHA1\s0\fR, \fB\s-1SHA224\s0\fR,
  243. \&\fB\s-1SHA256\s0\fR, \fB\s-1SHA384\s0\fR or \fB\s-1SHA512\s0\fR. Note: algorithm and hash names are case
  244. sensitive. \fBsignature_scheme\fR is one of the signature schemes defined in
  245. TLSv1.3, specified using the \s-1IETF\s0 name, e.g., \fBecdsa_secp256r1_sha256\fR,
  246. \&\fBed25519\fR, or \fBrsa_pss_pss_sha256\fR. Additional providers may make available
  247. further algorithms via the \s-1TLS_SIGALG\s0 capability.
  248. See \*(L"\s-1CAPABILITIES\*(R"\s0 in \fBprovider\-base\fR\|(7).
  249. .Sp
  250. If this option is not set then all signature algorithms supported by all
  251. activated providers are permissible.
  252. .Sp
  253. Note: algorithms which specify a PKCS#1 v1.5 signature scheme (either by
  254. using \fB\s-1RSA\s0\fR as the \fBalgorithm\fR or by using one of the \fBrsa_pkcs1_*\fR
  255. identifiers) are ignored in TLSv1.3 and will not be negotiated.
  256. .IP "\fB\-client_sigalgs\fR \fIalgs\fR" 4
  257. .IX Item "-client_sigalgs algs"
  258. This sets the supported signature algorithms associated with client
  259. authentication for TLSv1.2 and TLSv1.3. For servers the \fBalgs\fR is used
  260. in the \fBsignature_algorithms\fR field of a \fBCertificateRequest\fR message.
  261. For clients it is used to determine which signature algorithm to use with
  262. the client certificate. If a server does not request a certificate this
  263. option has no effect.
  264. .Sp
  265. The syntax of \fBalgs\fR is identical to \fB\-sigalgs\fR. If not set, then the
  266. value set for \fB\-sigalgs\fR will be used instead.
  267. .IP "\fB\-groups\fR \fIgroups\fR" 4
  268. .IX Item "-groups groups"
  269. This sets the supported groups. For clients, the groups are sent using
  270. the supported groups extension. For servers, it is used to determine which
  271. group to use. This setting affects groups used for signatures (in TLSv1.2
  272. and earlier) and key exchange. The first group listed will also be used
  273. for the \fBkey_share\fR sent by a client in a TLSv1.3 \fBClientHello\fR.
  274. .Sp
  275. The \fBgroups\fR argument is a colon separated list of groups. The group can
  276. be either the \fB\s-1NIST\s0\fR name (e.g. \fBP\-256\fR), some other commonly used name
  277. where applicable (e.g. \fBX25519\fR, \fBffdhe2048\fR) or an OpenSSL \s-1OID\s0 name
  278. (e.g. \fBprime256v1\fR). Group names are case sensitive. The list should be
  279. in order of preference with the most preferred group first.
  280. .Sp
  281. Currently supported groups for \fBTLSv1.3\fR are \fBP\-256\fR, \fBP\-384\fR, \fBP\-521\fR,
  282. \&\fBX25519\fR, \fBX448\fR, \fBffdhe2048\fR, \fBffdhe3072\fR, \fBffdhe4096\fR, \fBffdhe6144\fR,
  283. \&\fBffdhe8192\fR.
  284. .IP "\fB\-curves\fR \fIgroups\fR" 4
  285. .IX Item "-curves groups"
  286. This is a synonym for the \fB\-groups\fR command.
  287. .IP "\fB\-named_curve\fR \fIcurve\fR" 4
  288. .IX Item "-named_curve curve"
  289. This sets the temporary curve used for ephemeral \s-1ECDH\s0 modes. Only used
  290. by servers.
  291. .IP "\fB\-tx_cert_comp\fR" 4
  292. .IX Item "-tx_cert_comp"
  293. Enables support for sending TLSv1.3 compressed certificates.
  294. .IP "\fB\-no_tx_cert_comp\fR" 4
  295. .IX Item "-no_tx_cert_comp"
  296. Disables support for sending TLSv1.3 compressed certificates.
  297. .IP "\fB\-rx_cert_comp\fR" 4
  298. .IX Item "-rx_cert_comp"
  299. Enables support for receiving TLSv1.3 compressed certificates.
  300. .IP "\fB\-no_rx_cert_comp\fR" 4
  301. .IX Item "-no_rx_cert_comp"
  302. Disables support for receiving TLSv1.3 compressed certificates.
  303. .IP "\fB\-comp\fR" 4
  304. .IX Item "-comp"
  305. The \fBgroups\fR argument is a curve name or the special value \fBauto\fR which
  306. picks an appropriate curve based on client and server preferences. The
  307. curve can be either the \fB\s-1NIST\s0\fR name (e.g. \fBP\-256\fR) or an OpenSSL \s-1OID\s0 name
  308. (e.g. \fBprime256v1\fR). Curve names are case sensitive.
  309. .IP "\fB\-cipher\fR \fIciphers\fR" 4
  310. .IX Item "-cipher ciphers"
  311. Sets the TLSv1.2 and below ciphersuite list to \fBciphers\fR. This list will be
  312. combined with any configured TLSv1.3 ciphersuites. Note: syntax checking
  313. of \fBciphers\fR is currently not performed unless a \fB\s-1SSL\s0\fR or \fB\s-1SSL_CTX\s0\fR
  314. structure is associated with \fBctx\fR.
  315. .IP "\fB\-ciphersuites\fR \fI1.3ciphers\fR" 4
  316. .IX Item "-ciphersuites 1.3ciphers"
  317. Sets the available ciphersuites for TLSv1.3 to value. This is a
  318. colon-separated list of TLSv1.3 ciphersuite names in order of preference. This
  319. list will be combined any configured TLSv1.2 and below ciphersuites.
  320. See \fBopenssl\-ciphers\fR\|(1) for more information.
  321. .IP "\fB\-min_protocol\fR \fIminprot\fR, \fB\-max_protocol\fR \fImaxprot\fR" 4
  322. .IX Item "-min_protocol minprot, -max_protocol maxprot"
  323. Sets the minimum and maximum supported protocol.
  324. Currently supported protocol values are \fBSSLv3\fR, \fBTLSv1\fR, \fBTLSv1.1\fR,
  325. \&\fBTLSv1.2\fR, \fBTLSv1.3\fR for \s-1TLS\s0; \fBDTLSv1\fR, \fBDTLSv1.2\fR for \s-1DTLS,\s0 and \fBNone\fR
  326. for no limit.
  327. If either the lower or upper bound is not specified then only the other bound
  328. applies, if specified.
  329. If your application supports both \s-1TLS\s0 and \s-1DTLS\s0 you can specify any of these
  330. options twice, once with a bound for \s-1TLS\s0 and again with an appropriate bound
  331. for \s-1DTLS.\s0
  332. To restrict the supported protocol versions use these commands rather than the
  333. deprecated alternative commands below.
  334. .IP "\fB\-record_padding\fR \fIpadding\fR" 4
  335. .IX Item "-record_padding padding"
  336. Attempts to pad TLSv1.3 records so that they are a multiple of \fBpadding\fR
  337. in length on send. A \fBpadding\fR of 0 or 1 turns off padding. Otherwise,
  338. the \fBpadding\fR must be >1 or <=16384.
  339. .IP "\fB\-debug_broken_protocol\fR" 4
  340. .IX Item "-debug_broken_protocol"
  341. Ignored.
  342. .IP "\fB\-no_middlebox\fR" 4
  343. .IX Item "-no_middlebox"
  344. Turn off \*(L"middlebox compatibility\*(R", as described below.
  345. .SS "Additional Options"
  346. .IX Subsection "Additional Options"
  347. The following options are accepted by \fBSSL_CONF_cmd()\fR, but are not
  348. processed by the OpenSSL commands.
  349. .IP "\fB\-cert\fR \fIfile\fR" 4
  350. .IX Item "-cert file"
  351. Attempts to use \fBfile\fR as the certificate for the appropriate context. It
  352. currently uses \fBSSL_CTX_use_certificate_chain_file()\fR if an \fB\s-1SSL_CTX\s0\fR
  353. structure is set or \fBSSL_use_certificate_file()\fR with filetype \s-1PEM\s0 if an
  354. \&\fB\s-1SSL\s0\fR structure is set. This option is only supported if certificate
  355. operations are permitted.
  356. .IP "\fB\-key\fR \fIfile\fR" 4
  357. .IX Item "-key file"
  358. Attempts to use \fBfile\fR as the private key for the appropriate context. This
  359. option is only supported if certificate operations are permitted. Note:
  360. if no \fB\-key\fR option is set then a private key is not loaded unless the
  361. flag \fB\s-1SSL_CONF_FLAG_REQUIRE_PRIVATE\s0\fR is set.
  362. .IP "\fB\-dhparam\fR \fIfile\fR" 4
  363. .IX Item "-dhparam file"
  364. Attempts to use \fBfile\fR as the set of temporary \s-1DH\s0 parameters for
  365. the appropriate context. This option is only supported if certificate
  366. operations are permitted.
  367. .IP "\fB\-no_ssl3\fR, \fB\-no_tls1\fR, \fB\-no_tls1_1\fR, \fB\-no_tls1_2\fR, \fB\-no_tls1_3\fR" 4
  368. .IX Item "-no_ssl3, -no_tls1, -no_tls1_1, -no_tls1_2, -no_tls1_3"
  369. Disables protocol support for SSLv3, TLSv1.0, TLSv1.1, TLSv1.2 or TLSv1.3 by
  370. setting the corresponding options \fBSSL_OP_NO_SSLv3\fR, \fBSSL_OP_NO_TLSv1\fR,
  371. \&\fBSSL_OP_NO_TLSv1_1\fR, \fBSSL_OP_NO_TLSv1_2\fR and \fBSSL_OP_NO_TLSv1_3\fR
  372. respectively. These options are deprecated, use \fB\-min_protocol\fR and
  373. \&\fB\-max_protocol\fR instead.
  374. .IP "\fB\-anti_replay\fR, \fB\-no_anti_replay\fR" 4
  375. .IX Item "-anti_replay, -no_anti_replay"
  376. Switches replay protection, on or off respectively. With replay protection on,
  377. OpenSSL will automatically detect if a session ticket has been used more than
  378. once, TLSv1.3 has been negotiated, and early data is enabled on the server. A
  379. full handshake is forced if a session ticket is used a second or subsequent
  380. time. Anti-Replay is on by default unless overridden by a configuration file and
  381. is only used by servers. Anti-replay measures are required for compliance with
  382. the TLSv1.3 specification. Some applications may be able to mitigate the replay
  383. risks in other ways and in such cases the built-in OpenSSL functionality is not
  384. required. Switching off anti-replay is equivalent to \fB\s-1SSL_OP_NO_ANTI_REPLAY\s0\fR.
  385. .SH "SUPPORTED CONFIGURATION FILE COMMANDS"
  386. .IX Header "SUPPORTED CONFIGURATION FILE COMMANDS"
  387. Currently supported \fBoption\fR names for configuration files (i.e., when the
  388. flag \fB\s-1SSL_CONF_FLAG_FILE\s0\fR is set) are listed below. All configuration file
  389. \&\fBoption\fR names are case insensitive so \fBsignaturealgorithms\fR is recognised
  390. as well as \fBSignatureAlgorithms\fR. Unless otherwise stated the \fBvalue\fR names
  391. are also case insensitive.
  392. .PP
  393. Note: the command prefix (if set) alters the recognised \fBoption\fR values.
  394. .IP "\fBCipherString\fR" 4
  395. .IX Item "CipherString"
  396. Sets the ciphersuite list for TLSv1.2 and below to \fBvalue\fR. This list will be
  397. combined with any configured TLSv1.3 ciphersuites. Note: syntax
  398. checking of \fBvalue\fR is currently not performed unless an \fB\s-1SSL\s0\fR or \fB\s-1SSL_CTX\s0\fR
  399. structure is associated with \fBctx\fR.
  400. .IP "\fBCiphersuites\fR" 4
  401. .IX Item "Ciphersuites"
  402. Sets the available ciphersuites for TLSv1.3 to \fBvalue\fR. This is a
  403. colon-separated list of TLSv1.3 ciphersuite names in order of preference. This
  404. list will be combined any configured TLSv1.2 and below ciphersuites.
  405. See \fBopenssl\-ciphers\fR\|(1) for more information.
  406. .IP "\fBCertificate\fR" 4
  407. .IX Item "Certificate"
  408. Attempts to use the file \fBvalue\fR as the certificate for the appropriate
  409. context. It currently uses \fBSSL_CTX_use_certificate_chain_file()\fR if an \fB\s-1SSL_CTX\s0\fR
  410. structure is set or \fBSSL_use_certificate_file()\fR with filetype \s-1PEM\s0 if an \fB\s-1SSL\s0\fR
  411. structure is set. This option is only supported if certificate operations
  412. are permitted.
  413. .IP "\fBPrivateKey\fR" 4
  414. .IX Item "PrivateKey"
  415. Attempts to use the file \fBvalue\fR as the private key for the appropriate
  416. context. This option is only supported if certificate operations
  417. are permitted. Note: if no \fBPrivateKey\fR option is set then a private key is
  418. not loaded unless the \fB\s-1SSL_CONF_FLAG_REQUIRE_PRIVATE\s0\fR is set.
  419. .IP "\fBChainCAFile\fR, \fBChainCAPath\fR, \fBVerifyCAFile\fR, \fBVerifyCAPath\fR" 4
  420. .IX Item "ChainCAFile, ChainCAPath, VerifyCAFile, VerifyCAPath"
  421. These options indicate a file or directory used for building certificate
  422. chains or verifying certificate chains. These options are only supported
  423. if certificate operations are permitted.
  424. .IP "\fBRequestCAFile\fR" 4
  425. .IX Item "RequestCAFile"
  426. This option indicates a file containing a set of certificates in \s-1PEM\s0 form.
  427. The subject names of the certificates are sent to the peer in the
  428. \&\fBcertificate_authorities\fR extension for \s-1TLS 1.3\s0 (in ClientHello or
  429. CertificateRequest) or in a certificate request for previous versions or
  430. \&\s-1TLS.\s0
  431. .IP "\fBServerInfoFile\fR" 4
  432. .IX Item "ServerInfoFile"
  433. Attempts to use the file \fBvalue\fR in the \*(L"serverinfo\*(R" extension using the
  434. function SSL_CTX_use_serverinfo_file.
  435. .IP "\fBDHParameters\fR" 4
  436. .IX Item "DHParameters"
  437. Attempts to use the file \fBvalue\fR as the set of temporary \s-1DH\s0 parameters for
  438. the appropriate context. This option is only supported if certificate
  439. operations are permitted.
  440. .IP "\fBRecordPadding\fR" 4
  441. .IX Item "RecordPadding"
  442. Attempts to pad TLSv1.3 records so that they are a multiple of \fBvalue\fR in
  443. length on send. A \fBvalue\fR of 0 or 1 turns off padding. Otherwise, the
  444. \&\fBvalue\fR must be >1 or <=16384.
  445. .IP "\fBSignatureAlgorithms\fR" 4
  446. .IX Item "SignatureAlgorithms"
  447. This sets the supported signature algorithms for TLSv1.2 and TLSv1.3.
  448. For clients this
  449. value is used directly for the supported signature algorithms extension. For
  450. servers it is used to determine which signature algorithms to support.
  451. .Sp
  452. The \fBvalue\fR argument should be a colon separated list of signature algorithms
  453. in order of decreasing preference of the form \fBalgorithm+hash\fR or
  454. \&\fBsignature_scheme\fR. For the default providers shipped with OpenSSL,
  455. \&\fBalgorithm\fR is one of \fB\s-1RSA\s0\fR, \fB\s-1DSA\s0\fR or \fB\s-1ECDSA\s0\fR and \fBhash\fR is a supported
  456. algorithm \s-1OID\s0 short name such as \fB\s-1SHA1\s0\fR, \fB\s-1SHA224\s0\fR, \fB\s-1SHA256\s0\fR, \fB\s-1SHA384\s0\fR
  457. or \fB\s-1SHA512\s0\fR.
  458. Note: algorithm and hash names are case sensitive.
  459. \&\fBsignature_scheme\fR is one of the signature schemes defined in TLSv1.3,
  460. specified using the \s-1IETF\s0 name, e.g., \fBecdsa_secp256r1_sha256\fR, \fBed25519\fR,
  461. or \fBrsa_pss_pss_sha256\fR.
  462. Additional providers may make available further algorithms via the \s-1TLS_SIGALG\s0
  463. capability. See \*(L"\s-1CAPABILITIES\*(R"\s0 in \fBprovider\-base\fR\|(7).
  464. .Sp
  465. If this option is not set then all signature algorithms supported by all
  466. activated providers are permissible.
  467. .Sp
  468. Note: algorithms which specify a PKCS#1 v1.5 signature scheme (either by
  469. using \fB\s-1RSA\s0\fR as the \fBalgorithm\fR or by using one of the \fBrsa_pkcs1_*\fR
  470. identifiers) are ignored in TLSv1.3 and will not be negotiated.
  471. .IP "\fBClientSignatureAlgorithms\fR" 4
  472. .IX Item "ClientSignatureAlgorithms"
  473. This sets the supported signature algorithms associated with client
  474. authentication for TLSv1.2 and TLSv1.3.
  475. For servers the value is used in the
  476. \&\fBsignature_algorithms\fR field of a \fBCertificateRequest\fR message.
  477. For clients it is
  478. used to determine which signature algorithm to use with the client certificate.
  479. If a server does not request a certificate this option has no effect.
  480. .Sp
  481. The syntax of \fBvalue\fR is identical to \fBSignatureAlgorithms\fR. If not set then
  482. the value set for \fBSignatureAlgorithms\fR will be used instead.
  483. .IP "\fBGroups\fR" 4
  484. .IX Item "Groups"
  485. This sets the supported groups. For clients, the groups are
  486. sent using the supported groups extension. For servers, it is used
  487. to determine which group to use. This setting affects groups used for
  488. signatures (in TLSv1.2 and earlier) and key exchange. The first group listed
  489. will also be used for the \fBkey_share\fR sent by a client in a TLSv1.3
  490. \&\fBClientHello\fR.
  491. .Sp
  492. The \fBvalue\fR argument is a colon separated list of groups. The group can be
  493. either the \fB\s-1NIST\s0\fR name (e.g. \fBP\-256\fR), some other commonly used name where
  494. applicable (e.g. \fBX25519\fR, \fBffdhe2048\fR) or an OpenSSL \s-1OID\s0 name
  495. (e.g. \fBprime256v1\fR). Group names are case sensitive. The list should be in
  496. order of preference with the most preferred group first.
  497. .Sp
  498. Currently supported groups for \fBTLSv1.3\fR are \fBP\-256\fR, \fBP\-384\fR, \fBP\-521\fR,
  499. \&\fBX25519\fR, \fBX448\fR, \fBffdhe2048\fR, \fBffdhe3072\fR, \fBffdhe4096\fR, \fBffdhe6144\fR,
  500. \&\fBffdhe8192\fR.
  501. .IP "\fBCurves\fR" 4
  502. .IX Item "Curves"
  503. This is a synonym for the \*(L"Groups\*(R" command.
  504. .IP "\fBMinProtocol\fR" 4
  505. .IX Item "MinProtocol"
  506. This sets the minimum supported \s-1SSL, TLS\s0 or \s-1DTLS\s0 version.
  507. .Sp
  508. Currently supported protocol values are \fBSSLv3\fR, \fBTLSv1\fR, \fBTLSv1.1\fR,
  509. \&\fBTLSv1.2\fR, \fBTLSv1.3\fR, \fBDTLSv1\fR and \fBDTLSv1.2\fR.
  510. The \s-1SSL\s0 and \s-1TLS\s0 bounds apply only to TLS-based contexts, while the \s-1DTLS\s0 bounds
  511. apply only to DTLS-based contexts.
  512. The command can be repeated with one instance setting a \s-1TLS\s0 bound, and the
  513. other setting a \s-1DTLS\s0 bound.
  514. The value \fBNone\fR applies to both types of contexts and disables the limits.
  515. .IP "\fBMaxProtocol\fR" 4
  516. .IX Item "MaxProtocol"
  517. This sets the maximum supported \s-1SSL, TLS\s0 or \s-1DTLS\s0 version.
  518. .Sp
  519. Currently supported protocol values are \fBSSLv3\fR, \fBTLSv1\fR, \fBTLSv1.1\fR,
  520. \&\fBTLSv1.2\fR, \fBTLSv1.3\fR, \fBDTLSv1\fR and \fBDTLSv1.2\fR.
  521. The \s-1SSL\s0 and \s-1TLS\s0 bounds apply only to TLS-based contexts, while the \s-1DTLS\s0 bounds
  522. apply only to DTLS-based contexts.
  523. The command can be repeated with one instance setting a \s-1TLS\s0 bound, and the
  524. other setting a \s-1DTLS\s0 bound.
  525. The value \fBNone\fR applies to both types of contexts and disables the limits.
  526. .IP "\fBProtocol\fR" 4
  527. .IX Item "Protocol"
  528. This can be used to enable or disable certain versions of the \s-1SSL,
  529. TLS\s0 or \s-1DTLS\s0 protocol.
  530. .Sp
  531. The \fBvalue\fR argument is a comma separated list of supported protocols
  532. to enable or disable.
  533. If a protocol is preceded by \fB\-\fR that version is disabled.
  534. .Sp
  535. All protocol versions are enabled by default.
  536. You need to disable at least one protocol version for this setting have any
  537. effect.
  538. Only enabling some protocol versions does not disable the other protocol
  539. versions.
  540. .Sp
  541. Currently supported protocol values are \fBSSLv3\fR, \fBTLSv1\fR, \fBTLSv1.1\fR,
  542. \&\fBTLSv1.2\fR, \fBTLSv1.3\fR, \fBDTLSv1\fR and \fBDTLSv1.2\fR.
  543. The special value \fB\s-1ALL\s0\fR refers to all supported versions.
  544. .Sp
  545. This can't enable protocols that are disabled using \fBMinProtocol\fR
  546. or \fBMaxProtocol\fR, but can disable protocols that are still allowed
  547. by them.
  548. .Sp
  549. The \fBProtocol\fR command is fragile and deprecated; do not use it.
  550. Use \fBMinProtocol\fR and \fBMaxProtocol\fR instead.
  551. If you do use \fBProtocol\fR, make sure that the resulting range of enabled
  552. protocols has no \*(L"holes\*(R", e.g. if \s-1TLS 1.0\s0 and \s-1TLS 1.2\s0 are both enabled, make
  553. sure to also leave \s-1TLS 1.1\s0 enabled.
  554. .IP "\fBOptions\fR" 4
  555. .IX Item "Options"
  556. The \fBvalue\fR argument is a comma separated list of various flags to set.
  557. If a flag string is preceded \fB\-\fR it is disabled.
  558. See the \fBSSL_CTX_set_options\fR\|(3) function for more details of
  559. individual options.
  560. .Sp
  561. Each option is listed below. Where an operation is enabled by default
  562. the \fB\-flag\fR syntax is needed to disable it.
  563. .Sp
  564. \&\fBSessionTicket\fR: session ticket support, enabled by default. Inverse of
  565. \&\fB\s-1SSL_OP_NO_TICKET\s0\fR: that is \fB\-SessionTicket\fR is the same as setting
  566. \&\fB\s-1SSL_OP_NO_TICKET\s0\fR.
  567. .Sp
  568. \&\fBCompression\fR: \s-1SSL/TLS\s0 compression support, disabled by default. Inverse
  569. of \fB\s-1SSL_OP_NO_COMPRESSION\s0\fR.
  570. .Sp
  571. \&\fBEmptyFragments\fR: use empty fragments as a countermeasure against a
  572. \&\s-1SSL 3.0/TLS 1.0\s0 protocol vulnerability affecting \s-1CBC\s0 ciphers. It
  573. is set by default. Inverse of \fB\s-1SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS\s0\fR.
  574. .Sp
  575. \&\fBBugs\fR: enable various bug workarounds. Same as \fB\s-1SSL_OP_ALL\s0\fR.
  576. .Sp
  577. \&\fBDHSingle\fR: enable single use \s-1DH\s0 keys, set by default. Inverse of
  578. \&\fB\s-1SSL_OP_DH_SINGLE\s0\fR. Only used by servers.
  579. .Sp
  580. \&\fBECDHSingle\fR: enable single use \s-1ECDH\s0 keys, set by default. Inverse of
  581. \&\fB\s-1SSL_OP_ECDH_SINGLE\s0\fR. Only used by servers.
  582. .Sp
  583. \&\fBServerPreference\fR: use server and not client preference order when
  584. determining which cipher suite, signature algorithm or elliptic curve
  585. to use for an incoming connection. Equivalent to
  586. \&\fB\s-1SSL_OP_CIPHER_SERVER_PREFERENCE\s0\fR. Only used by servers.
  587. .Sp
  588. \&\fBPrioritizeChaCha\fR: prioritizes ChaCha ciphers when the client has a
  589. ChaCha20 cipher at the top of its preference list. This usually indicates
  590. a mobile client is in use. Equivalent to \fB\s-1SSL_OP_PRIORITIZE_CHACHA\s0\fR.
  591. Only used by servers.
  592. .Sp
  593. \&\fBNoResumptionOnRenegotiation\fR: set
  594. \&\fB\s-1SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION\s0\fR flag. Only used by servers.
  595. .Sp
  596. \&\fBNoRenegotiation\fR: disables all attempts at renegotiation in TLSv1.2 and
  597. earlier, same as setting \fB\s-1SSL_OP_NO_RENEGOTIATION\s0\fR.
  598. .Sp
  599. \&\fBUnsafeLegacyRenegotiation\fR: permits the use of unsafe legacy renegotiation.
  600. Equivalent to \fB\s-1SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION\s0\fR.
  601. .Sp
  602. \&\fBUnsafeLegacyServerConnect\fR: permits the use of unsafe legacy renegotiation
  603. for OpenSSL clients only. Equivalent to \fB\s-1SSL_OP_LEGACY_SERVER_CONNECT\s0\fR.
  604. .Sp
  605. \&\fBEncryptThenMac\fR: use encrypt-then-mac extension, enabled by
  606. default. Inverse of \fB\s-1SSL_OP_NO_ENCRYPT_THEN_MAC\s0\fR: that is,
  607. \&\fB\-EncryptThenMac\fR is the same as setting \fB\s-1SSL_OP_NO_ENCRYPT_THEN_MAC\s0\fR.
  608. .Sp
  609. \&\fBAllowNoDHEKEX\fR: In TLSv1.3 allow a non\-(ec)dhe based key exchange mode on
  610. resumption. This means that there will be no forward secrecy for the resumed
  611. session. Equivalent to \fB\s-1SSL_OP_ALLOW_NO_DHE_KEX\s0\fR.
  612. .Sp
  613. \&\fBPreferNoDHEKEX\fR: In TLSv1.3, on resumption let the server prefer a
  614. non\-(ec)dhe based key exchange mode over an (ec)dhe based one. Requires
  615. \&\fBAllowNoDHEKEX\fR. Equivalent to \fB\s-1SSL_OP_PREFER_NO_DHE_KEX\s0\fR. Only used by
  616. servers.
  617. .Sp
  618. \&\fBMiddleboxCompat\fR: If set then dummy Change Cipher Spec (\s-1CCS\s0) messages are sent
  619. in TLSv1.3. This has the effect of making TLSv1.3 look more like TLSv1.2 so that
  620. middleboxes that do not understand TLSv1.3 will not drop the connection. This
  621. option is set by default. A future version of OpenSSL may not set this by
  622. default. Equivalent to \fB\s-1SSL_OP_ENABLE_MIDDLEBOX_COMPAT\s0\fR.
  623. .Sp
  624. \&\fBAntiReplay\fR: If set then OpenSSL will automatically detect if a session ticket
  625. has been used more than once, TLSv1.3 has been negotiated, and early data is
  626. enabled on the server. A full handshake is forced if a session ticket is used a
  627. second or subsequent time. This option is set by default and is only used by
  628. servers. Anti-replay measures are required to comply with the TLSv1.3
  629. specification. Some applications may be able to mitigate the replay risks in
  630. other ways and in such cases the built-in OpenSSL functionality is not required.
  631. Disabling anti-replay is equivalent to setting \fB\s-1SSL_OP_NO_ANTI_REPLAY\s0\fR.
  632. .Sp
  633. \&\fBExtendedMasterSecret\fR: use extended master secret extension, enabled by
  634. default. Inverse of \fB\s-1SSL_OP_NO_EXTENDED_MASTER_SECRET\s0\fR: that is,
  635. \&\fB\-ExtendedMasterSecret\fR is the same as setting \fB\s-1SSL_OP_NO_EXTENDED_MASTER_SECRET\s0\fR.
  636. .Sp
  637. \&\fBCANames\fR: use \s-1CA\s0 names extension, enabled by
  638. default. Inverse of \fB\s-1SSL_OP_DISABLE_TLSEXT_CA_NAMES\s0\fR: that is,
  639. \&\fB\-CANames\fR is the same as setting \fB\s-1SSL_OP_DISABLE_TLSEXT_CA_NAMES\s0\fR.
  640. .Sp
  641. \&\fB\s-1KTLS\s0\fR: Enables kernel \s-1TLS\s0 if support has been compiled in, and it is supported
  642. by the negotiated ciphersuites and extensions. Equivalent to
  643. \&\fB\s-1SSL_OP_ENABLE_KTLS\s0\fR.
  644. .Sp
  645. \&\fBStrictCertCheck\fR: Enable strict certificate checking. Equivalent to
  646. setting \fB\s-1SSL_CERT_FLAG_TLS_STRICT\s0\fR with \fBSSL_CTX_set_cert_flags()\fR.
  647. .Sp
  648. \&\fBTxCertificateCompression\fR: support sending compressed certificates, enabled by
  649. default. Inverse of \fB\s-1SSL_OP_NO_TX_CERTIFICATE_COMPRESSION\s0\fR: that is,
  650. \&\fB\-TxCertificateCompression\fR is the same as setting \fB\s-1SSL_OP_NO_TX_CERTIFICATE_COMPRESSION\s0\fR.
  651. .Sp
  652. \&\fBRxCertificateCompression\fR: support receiving compressed certificates, enabled by
  653. default. Inverse of \fB\s-1SSL_OP_NO_RX_CERTIFICATE_COMPRESSION\s0\fR: that is,
  654. \&\fB\-RxCertificateCompression\fR is the same as setting \fB\s-1SSL_OP_NO_RX_CERTIFICATE_COMPRESSION\s0\fR.
  655. .Sp
  656. \&\fBKTLSTxZerocopySendfile\fR: use the zerocopy \s-1TX\s0 mode of \fBsendfile()\fR, which gives
  657. a performance boost when used with \s-1KTLS\s0 hardware offload. Note that invalid \s-1TLS\s0
  658. records might be transmitted if the file is changed while being sent. This
  659. option has no effect if \fB\s-1KTLS\s0\fR is not enabled. Equivalent to
  660. \&\fB\s-1SSL_OP_ENABLE_KTLS_TX_ZEROCOPY_SENDFILE\s0\fR. This option only applies to Linux.
  661. \&\s-1KTLS\s0 sendfile on FreeBSD doesn't offer an option to disable zerocopy and
  662. always runs in this mode.
  663. .Sp
  664. \&\fBIgnoreUnexpectedEOF\fR: Equivalent to \fB\s-1SSL_OP_IGNORE_UNEXPECTED_EOF\s0\fR.
  665. You should only enable this option if the protocol running over \s-1TLS\s0 can detect
  666. a truncation attack itself, and that the application is checking for that
  667. truncation attack.
  668. .IP "\fBVerifyMode\fR" 4
  669. .IX Item "VerifyMode"
  670. The \fBvalue\fR argument is a comma separated list of flags to set.
  671. .Sp
  672. \&\fBPeer\fR enables peer verification: for clients only.
  673. .Sp
  674. \&\fBRequest\fR requests but does not require a certificate from the client.
  675. Servers only.
  676. .Sp
  677. \&\fBRequire\fR requests and requires a certificate from the client: an error
  678. occurs if the client does not present a certificate. Servers only.
  679. .Sp
  680. \&\fBOnce\fR requests a certificate from a client only on the initial connection:
  681. not when renegotiating. Servers only.
  682. .Sp
  683. \&\fBRequestPostHandshake\fR configures the connection to support requests but does
  684. not require a certificate from the client post-handshake. A certificate will
  685. not be requested during the initial handshake. The server application must
  686. provide a mechanism to request a certificate post-handshake. Servers only.
  687. TLSv1.3 only.
  688. .Sp
  689. \&\fBRequiresPostHandshake\fR configures the connection to support requests and
  690. requires a certificate from the client post-handshake: an error occurs if the
  691. client does not present a certificate. A certificate will not be requested
  692. during the initial handshake. The server application must provide a mechanism
  693. to request a certificate post-handshake. Servers only. TLSv1.3 only.
  694. .IP "\fBClientCAFile\fR, \fBClientCAPath\fR" 4
  695. .IX Item "ClientCAFile, ClientCAPath"
  696. A file or directory of certificates in \s-1PEM\s0 format whose names are used as the
  697. set of acceptable names for client CAs. Servers only. This option is only
  698. supported if certificate operations are permitted.
  699. .SH "SUPPORTED COMMAND TYPES"
  700. .IX Header "SUPPORTED COMMAND TYPES"
  701. The function \fBSSL_CONF_cmd_value_type()\fR currently returns one of the following
  702. types:
  703. .IP "\fB\s-1SSL_CONF_TYPE_UNKNOWN\s0\fR" 4
  704. .IX Item "SSL_CONF_TYPE_UNKNOWN"
  705. The \fBoption\fR string is unrecognised, this return value can be use to flag
  706. syntax errors.
  707. .IP "\fB\s-1SSL_CONF_TYPE_STRING\s0\fR" 4
  708. .IX Item "SSL_CONF_TYPE_STRING"
  709. The value is a string without any specific structure.
  710. .IP "\fB\s-1SSL_CONF_TYPE_FILE\s0\fR" 4
  711. .IX Item "SSL_CONF_TYPE_FILE"
  712. The value is a filename.
  713. .IP "\fB\s-1SSL_CONF_TYPE_DIR\s0\fR" 4
  714. .IX Item "SSL_CONF_TYPE_DIR"
  715. The value is a directory name.
  716. .IP "\fB\s-1SSL_CONF_TYPE_NONE\s0\fR" 4
  717. .IX Item "SSL_CONF_TYPE_NONE"
  718. The value string is not used e.g. a command line option which doesn't take an
  719. argument.
  720. .SH "NOTES"
  721. .IX Header "NOTES"
  722. The order of operations is significant. This can be used to set either defaults
  723. or values which cannot be overridden. For example if an application calls:
  724. .PP
  725. .Vb 2
  726. \& SSL_CONF_cmd(ctx, "Protocol", "\-SSLv3");
  727. \& SSL_CONF_cmd(ctx, userparam, uservalue);
  728. .Ve
  729. .PP
  730. it will disable SSLv3 support by default but the user can override it. If
  731. however the call sequence is:
  732. .PP
  733. .Vb 2
  734. \& SSL_CONF_cmd(ctx, userparam, uservalue);
  735. \& SSL_CONF_cmd(ctx, "Protocol", "\-SSLv3");
  736. .Ve
  737. .PP
  738. SSLv3 is \fBalways\fR disabled and attempt to override this by the user are
  739. ignored.
  740. .PP
  741. By checking the return code of \fBSSL_CONF_cmd()\fR it is possible to query if a
  742. given \fBoption\fR is recognised, this is useful if \fBSSL_CONF_cmd()\fR values are
  743. mixed with additional application specific operations.
  744. .PP
  745. For example an application might call \fBSSL_CONF_cmd()\fR and if it returns
  746. \&\-2 (unrecognised command) continue with processing of application specific
  747. commands.
  748. .PP
  749. Applications can also use \fBSSL_CONF_cmd()\fR to process command lines though the
  750. utility function \fBSSL_CONF_cmd_argv()\fR is normally used instead. One way
  751. to do this is to set the prefix to an appropriate value using
  752. \&\fBSSL_CONF_CTX_set1_prefix()\fR, pass the current argument to \fBoption\fR and the
  753. following argument to \fBvalue\fR (which may be \s-1NULL\s0).
  754. .PP
  755. In this case if the return value is positive then it is used to skip that
  756. number of arguments as they have been processed by \fBSSL_CONF_cmd()\fR. If \-2 is
  757. returned then \fBoption\fR is not recognised and application specific arguments
  758. can be checked instead. If \-3 is returned a required argument is missing
  759. and an error is indicated. If 0 is returned some other error occurred and
  760. this can be reported back to the user.
  761. .PP
  762. The function \fBSSL_CONF_cmd_value_type()\fR can be used by applications to
  763. check for the existence of a command or to perform additional syntax
  764. checking or translation of the command value. For example if the return
  765. value is \fB\s-1SSL_CONF_TYPE_FILE\s0\fR an application could translate a relative
  766. pathname to an absolute pathname.
  767. .SH "RETURN VALUES"
  768. .IX Header "RETURN VALUES"
  769. \&\fBSSL_CONF_cmd()\fR returns 1 if the value of \fBoption\fR is recognised and \fBvalue\fR is
  770. \&\fB\s-1NOT\s0\fR used and 2 if both \fBoption\fR and \fBvalue\fR are used. In other words it
  771. returns the number of arguments processed. This is useful when processing
  772. command lines.
  773. .PP
  774. A return value of \-2 means \fBoption\fR is not recognised.
  775. .PP
  776. A return value of \-3 means \fBoption\fR is recognised and the command requires a
  777. value but \fBvalue\fR is \s-1NULL.\s0
  778. .PP
  779. A return code of 0 indicates that both \fBoption\fR and \fBvalue\fR are valid but an
  780. error occurred attempting to perform the operation: for example due to an
  781. error in the syntax of \fBvalue\fR in this case the error queue may provide
  782. additional information.
  783. .SH "EXAMPLES"
  784. .IX Header "EXAMPLES"
  785. Set supported signature algorithms:
  786. .PP
  787. .Vb 1
  788. \& SSL_CONF_cmd(ctx, "SignatureAlgorithms", "ECDSA+SHA256:RSA+SHA256:DSA+SHA256");
  789. .Ve
  790. .PP
  791. There are various ways to select the supported protocols.
  792. .PP
  793. This set the minimum protocol version to TLSv1, and so disables SSLv3.
  794. This is the recommended way to disable protocols.
  795. .PP
  796. .Vb 1
  797. \& SSL_CONF_cmd(ctx, "MinProtocol", "TLSv1");
  798. .Ve
  799. .PP
  800. The following also disables SSLv3:
  801. .PP
  802. .Vb 1
  803. \& SSL_CONF_cmd(ctx, "Protocol", "\-SSLv3");
  804. .Ve
  805. .PP
  806. The following will first enable all protocols, and then disable
  807. SSLv3.
  808. If no protocol versions were disabled before this has the same effect as
  809. \&\*(L"\-SSLv3\*(R", but if some versions were disables this will re-enable them before
  810. disabling SSLv3.
  811. .PP
  812. .Vb 1
  813. \& SSL_CONF_cmd(ctx, "Protocol", "ALL,\-SSLv3");
  814. .Ve
  815. .PP
  816. Only enable TLSv1.2:
  817. .PP
  818. .Vb 2
  819. \& SSL_CONF_cmd(ctx, "MinProtocol", "TLSv1.2");
  820. \& SSL_CONF_cmd(ctx, "MaxProtocol", "TLSv1.2");
  821. .Ve
  822. .PP
  823. This also only enables TLSv1.2:
  824. .PP
  825. .Vb 1
  826. \& SSL_CONF_cmd(ctx, "Protocol", "\-ALL,TLSv1.2");
  827. .Ve
  828. .PP
  829. Disable \s-1TLS\s0 session tickets:
  830. .PP
  831. .Vb 1
  832. \& SSL_CONF_cmd(ctx, "Options", "\-SessionTicket");
  833. .Ve
  834. .PP
  835. Enable compression:
  836. .PP
  837. .Vb 1
  838. \& SSL_CONF_cmd(ctx, "Options", "Compression");
  839. .Ve
  840. .PP
  841. Set supported curves to P\-256, P\-384:
  842. .PP
  843. .Vb 1
  844. \& SSL_CONF_cmd(ctx, "Curves", "P\-256:P\-384");
  845. .Ve
  846. .SH "SEE ALSO"
  847. .IX Header "SEE ALSO"
  848. \&\fBssl\fR\|(7),
  849. \&\fBSSL_CONF_CTX_new\fR\|(3),
  850. \&\fBSSL_CONF_CTX_set_flags\fR\|(3),
  851. \&\fBSSL_CONF_CTX_set1_prefix\fR\|(3),
  852. \&\fBSSL_CONF_CTX_set_ssl_ctx\fR\|(3),
  853. \&\fBSSL_CONF_cmd_argv\fR\|(3),
  854. \&\fBSSL_CTX_set_options\fR\|(3)
  855. .SH "HISTORY"
  856. .IX Header "HISTORY"
  857. The \fBSSL_CONF_cmd()\fR function was added in OpenSSL 1.0.2.
  858. .PP
  859. The \fB\s-1SSL_OP_NO_SSL2\s0\fR option doesn't have effect since 1.1.0, but the macro
  860. is retained for backwards compatibility.
  861. .PP
  862. The \fB\s-1SSL_CONF_TYPE_NONE\s0\fR was added in OpenSSL 1.1.0. In earlier versions of
  863. OpenSSL passing a command which didn't take an argument would return
  864. \&\fB\s-1SSL_CONF_TYPE_UNKNOWN\s0\fR.
  865. .PP
  866. \&\fBMinProtocol\fR and \fBMaxProtocol\fR where added in OpenSSL 1.1.0.
  867. .PP
  868. \&\fBAllowNoDHEKEX\fR and \fBPrioritizeChaCha\fR were added in OpenSSL 1.1.1.
  869. .PP
  870. The \fBUnsafeLegacyServerConnect\fR option is no longer set by default from
  871. OpenSSL 3.0.
  872. .PP
  873. The \fBTxCertificateCompression\fR and \fBRxCertificateCompression\fR options were
  874. added in OpenSSL 3.2.
  875. .PP
  876. \&\fBPreferNoDHEKEX\fR was added in OpenSSL 3.3.
  877. .SH "COPYRIGHT"
  878. .IX Header "COPYRIGHT"
  879. Copyright 2012\-2024 The OpenSSL Project Authors. All Rights Reserved.
  880. .PP
  881. Licensed under the Apache License 2.0 (the \*(L"License\*(R"). You may not use
  882. this file except in compliance with the License. You can obtain a copy
  883. in the file \s-1LICENSE\s0 in the source distribution or at
  884. <https://www.openssl.org/source/license.html>.