s_client.1 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863
  1. .\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
  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 "S_CLIENT 1"
  136. .TH S_CLIENT 1 "2022-03-15" "1.1.1n" "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. openssl\-s_client, s_client \- SSL/TLS client program
  143. .SH "SYNOPSIS"
  144. .IX Header "SYNOPSIS"
  145. \&\fBopenssl\fR \fBs_client\fR
  146. [\fB\-help\fR]
  147. [\fB\-connect host:port\fR]
  148. [\fB\-bind host:port\fR]
  149. [\fB\-proxy host:port\fR]
  150. [\fB\-unix path\fR]
  151. [\fB\-4\fR]
  152. [\fB\-6\fR]
  153. [\fB\-servername name\fR]
  154. [\fB\-noservername\fR]
  155. [\fB\-verify depth\fR]
  156. [\fB\-verify_return_error\fR]
  157. [\fB\-cert filename\fR]
  158. [\fB\-certform DER|PEM\fR]
  159. [\fB\-key filename\fR]
  160. [\fB\-keyform DER|PEM\fR]
  161. [\fB\-cert_chain filename\fR]
  162. [\fB\-build_chain\fR]
  163. [\fB\-xkey\fR]
  164. [\fB\-xcert\fR]
  165. [\fB\-xchain\fR]
  166. [\fB\-xchain_build\fR]
  167. [\fB\-xcertform PEM|DER\fR]
  168. [\fB\-xkeyform PEM|DER\fR]
  169. [\fB\-pass arg\fR]
  170. [\fB\-CApath directory\fR]
  171. [\fB\-CAfile filename\fR]
  172. [\fB\-chainCApath directory\fR]
  173. [\fB\-chainCAfile filename\fR]
  174. [\fB\-no\-CAfile\fR]
  175. [\fB\-no\-CApath\fR]
  176. [\fB\-requestCAfile filename\fR]
  177. [\fB\-dane_tlsa_domain domain\fR]
  178. [\fB\-dane_tlsa_rrdata rrdata\fR]
  179. [\fB\-dane_ee_no_namechecks\fR]
  180. [\fB\-attime timestamp\fR]
  181. [\fB\-check_ss_sig\fR]
  182. [\fB\-crl_check\fR]
  183. [\fB\-crl_check_all\fR]
  184. [\fB\-explicit_policy\fR]
  185. [\fB\-extended_crl\fR]
  186. [\fB\-ignore_critical\fR]
  187. [\fB\-inhibit_any\fR]
  188. [\fB\-inhibit_map\fR]
  189. [\fB\-no_check_time\fR]
  190. [\fB\-partial_chain\fR]
  191. [\fB\-policy arg\fR]
  192. [\fB\-policy_check\fR]
  193. [\fB\-policy_print\fR]
  194. [\fB\-purpose purpose\fR]
  195. [\fB\-suiteB_128\fR]
  196. [\fB\-suiteB_128_only\fR]
  197. [\fB\-suiteB_192\fR]
  198. [\fB\-trusted_first\fR]
  199. [\fB\-no_alt_chains\fR]
  200. [\fB\-use_deltas\fR]
  201. [\fB\-auth_level num\fR]
  202. [\fB\-nameopt option\fR]
  203. [\fB\-verify_depth num\fR]
  204. [\fB\-verify_email email\fR]
  205. [\fB\-verify_hostname hostname\fR]
  206. [\fB\-verify_ip ip\fR]
  207. [\fB\-verify_name name\fR]
  208. [\fB\-build_chain\fR]
  209. [\fB\-x509_strict\fR]
  210. [\fB\-reconnect\fR]
  211. [\fB\-showcerts\fR]
  212. [\fB\-debug\fR]
  213. [\fB\-msg\fR]
  214. [\fB\-nbio_test\fR]
  215. [\fB\-state\fR]
  216. [\fB\-nbio\fR]
  217. [\fB\-crlf\fR]
  218. [\fB\-ign_eof\fR]
  219. [\fB\-no_ign_eof\fR]
  220. [\fB\-psk_identity identity\fR]
  221. [\fB\-psk key\fR]
  222. [\fB\-psk_session file\fR]
  223. [\fB\-quiet\fR]
  224. [\fB\-ssl3\fR]
  225. [\fB\-tls1\fR]
  226. [\fB\-tls1_1\fR]
  227. [\fB\-tls1_2\fR]
  228. [\fB\-tls1_3\fR]
  229. [\fB\-no_ssl3\fR]
  230. [\fB\-no_tls1\fR]
  231. [\fB\-no_tls1_1\fR]
  232. [\fB\-no_tls1_2\fR]
  233. [\fB\-no_tls1_3\fR]
  234. [\fB\-dtls\fR]
  235. [\fB\-dtls1\fR]
  236. [\fB\-dtls1_2\fR]
  237. [\fB\-sctp\fR]
  238. [\fB\-sctp_label_bug\fR]
  239. [\fB\-fallback_scsv\fR]
  240. [\fB\-async\fR]
  241. [\fB\-max_send_frag\fR]
  242. [\fB\-split_send_frag\fR]
  243. [\fB\-max_pipelines\fR]
  244. [\fB\-read_buf\fR]
  245. [\fB\-bugs\fR]
  246. [\fB\-comp\fR]
  247. [\fB\-no_comp\fR]
  248. [\fB\-allow_no_dhe_kex\fR]
  249. [\fB\-sigalgs sigalglist\fR]
  250. [\fB\-curves curvelist\fR]
  251. [\fB\-cipher cipherlist\fR]
  252. [\fB\-ciphersuites val\fR]
  253. [\fB\-serverpref\fR]
  254. [\fB\-starttls protocol\fR]
  255. [\fB\-xmpphost hostname\fR]
  256. [\fB\-name hostname\fR]
  257. [\fB\-engine id\fR]
  258. [\fB\-tlsextdebug\fR]
  259. [\fB\-no_ticket\fR]
  260. [\fB\-sess_out filename\fR]
  261. [\fB\-sess_in filename\fR]
  262. [\fB\-rand file...\fR]
  263. [\fB\-writerand file\fR]
  264. [\fB\-serverinfo types\fR]
  265. [\fB\-status\fR]
  266. [\fB\-alpn protocols\fR]
  267. [\fB\-nextprotoneg protocols\fR]
  268. [\fB\-ct\fR]
  269. [\fB\-noct\fR]
  270. [\fB\-ctlogfile\fR]
  271. [\fB\-keylogfile file\fR]
  272. [\fB\-early_data file\fR]
  273. [\fB\-enable_pha\fR]
  274. [\fBtarget\fR]
  275. .SH "DESCRIPTION"
  276. .IX Header "DESCRIPTION"
  277. The \fBs_client\fR command implements a generic \s-1SSL/TLS\s0 client which connects
  278. to a remote host using \s-1SSL/TLS.\s0 It is a \fIvery\fR useful diagnostic tool for
  279. \&\s-1SSL\s0 servers.
  280. .SH "OPTIONS"
  281. .IX Header "OPTIONS"
  282. In addition to the options below the \fBs_client\fR utility also supports the
  283. common and client only options documented
  284. in the \*(L"Supported Command Line Commands\*(R" section of the \fBSSL_CONF_cmd\fR\|(3)
  285. manual page.
  286. .IP "\fB\-help\fR" 4
  287. .IX Item "-help"
  288. Print out a usage message.
  289. .IP "\fB\-connect host:port\fR" 4
  290. .IX Item "-connect host:port"
  291. This specifies the host and optional port to connect to. It is possible to
  292. select the host and port using the optional target positional argument instead.
  293. If neither this nor the target positional argument are specified then an attempt
  294. is made to connect to the local host on port 4433.
  295. .IP "\fB\-bind host:port\fR]" 4
  296. .IX Item "-bind host:port]"
  297. This specifies the host address and or port to bind as the source for the
  298. connection. For Unix-domain sockets the port is ignored and the host is
  299. used as the source socket address.
  300. .IP "\fB\-proxy host:port\fR" 4
  301. .IX Item "-proxy host:port"
  302. When used with the \fB\-connect\fR flag, the program uses the host and port
  303. specified with this flag and issues an \s-1HTTP CONNECT\s0 command to connect
  304. to the desired server.
  305. .IP "\fB\-unix path\fR" 4
  306. .IX Item "-unix path"
  307. Connect over the specified Unix-domain socket.
  308. .IP "\fB\-4\fR" 4
  309. .IX Item "-4"
  310. Use IPv4 only.
  311. .IP "\fB\-6\fR" 4
  312. .IX Item "-6"
  313. Use IPv6 only.
  314. .IP "\fB\-servername name\fR" 4
  315. .IX Item "-servername name"
  316. Set the \s-1TLS SNI\s0 (Server Name Indication) extension in the ClientHello message to
  317. the given value.
  318. If \fB\-servername\fR is not provided, the \s-1TLS SNI\s0 extension will be populated with
  319. the name given to \fB\-connect\fR if it follows a \s-1DNS\s0 name format. If \fB\-connect\fR is
  320. not provided either, the \s-1SNI\s0 is set to \*(L"localhost\*(R".
  321. This is the default since OpenSSL 1.1.1.
  322. .Sp
  323. Even though \s-1SNI\s0 should normally be a \s-1DNS\s0 name and not an \s-1IP\s0 address, if
  324. \&\fB\-servername\fR is provided then that name will be sent, regardless of whether
  325. it is a \s-1DNS\s0 name or not.
  326. .Sp
  327. This option cannot be used in conjunction with \fB\-noservername\fR.
  328. .IP "\fB\-noservername\fR" 4
  329. .IX Item "-noservername"
  330. Suppresses sending of the \s-1SNI\s0 (Server Name Indication) extension in the
  331. ClientHello message. Cannot be used in conjunction with the \fB\-servername\fR or
  332. <\-dane_tlsa_domain> options.
  333. .IP "\fB\-cert certname\fR" 4
  334. .IX Item "-cert certname"
  335. The certificate to use, if one is requested by the server. The default is
  336. not to use a certificate.
  337. .IP "\fB\-certform format\fR" 4
  338. .IX Item "-certform format"
  339. The certificate format to use: \s-1DER\s0 or \s-1PEM. PEM\s0 is the default.
  340. .IP "\fB\-key keyfile\fR" 4
  341. .IX Item "-key keyfile"
  342. The private key to use. If not specified then the certificate file will
  343. be used.
  344. .IP "\fB\-keyform format\fR" 4
  345. .IX Item "-keyform format"
  346. The private format to use: \s-1DER\s0 or \s-1PEM. PEM\s0 is the default.
  347. .IP "\fB\-cert_chain\fR" 4
  348. .IX Item "-cert_chain"
  349. A file containing trusted certificates to use when attempting to build the
  350. client/server certificate chain related to the certificate specified via the
  351. \&\fB\-cert\fR option.
  352. .IP "\fB\-build_chain\fR" 4
  353. .IX Item "-build_chain"
  354. Specify whether the application should build the certificate chain to be
  355. provided to the server.
  356. .IP "\fB\-xkey infile\fR, \fB\-xcert infile\fR, \fB\-xchain\fR" 4
  357. .IX Item "-xkey infile, -xcert infile, -xchain"
  358. Specify an extra certificate, private key and certificate chain. These behave
  359. in the same manner as the \fB\-cert\fR, \fB\-key\fR and \fB\-cert_chain\fR options. When
  360. specified, the callback returning the first valid chain will be in use by the
  361. client.
  362. .IP "\fB\-xchain_build\fR" 4
  363. .IX Item "-xchain_build"
  364. Specify whether the application should build the certificate chain to be
  365. provided to the server for the extra certificates provided via \fB\-xkey infile\fR,
  366. \&\fB\-xcert infile\fR, \fB\-xchain\fR options.
  367. .IP "\fB\-xcertform PEM|DER\fR, \fB\-xkeyform PEM|DER\fR" 4
  368. .IX Item "-xcertform PEM|DER, -xkeyform PEM|DER"
  369. Extra certificate and private key format respectively.
  370. .IP "\fB\-pass arg\fR" 4
  371. .IX Item "-pass arg"
  372. the private key password source. For more information about the format of \fBarg\fR
  373. see \*(L"Pass Phrase Options\*(R" in \fBopenssl\fR\|(1).
  374. .IP "\fB\-verify depth\fR" 4
  375. .IX Item "-verify depth"
  376. The verify depth to use. This specifies the maximum length of the
  377. server certificate chain and turns on server certificate verification.
  378. Currently the verify operation continues after errors so all the problems
  379. with a certificate chain can be seen. As a side effect the connection
  380. will never fail due to a server certificate verify failure.
  381. .IP "\fB\-verify_return_error\fR" 4
  382. .IX Item "-verify_return_error"
  383. Return verification errors instead of continuing. This will typically
  384. abort the handshake with a fatal error.
  385. .IP "\fB\-nameopt option\fR" 4
  386. .IX Item "-nameopt option"
  387. Option which determines how the subject or issuer names are displayed. The
  388. \&\fBoption\fR argument can be a single option or multiple options separated by
  389. commas. Alternatively the \fB\-nameopt\fR switch may be used more than once to
  390. set multiple options. See the \fBx509\fR\|(1) manual page for details.
  391. .IP "\fB\-CApath directory\fR" 4
  392. .IX Item "-CApath directory"
  393. The directory to use for server certificate verification. This directory
  394. must be in \*(L"hash format\*(R", see \fBverify\fR\|(1) for more information. These are
  395. also used when building the client certificate chain.
  396. .IP "\fB\-CAfile file\fR" 4
  397. .IX Item "-CAfile file"
  398. A file containing trusted certificates to use during server authentication
  399. and to use when attempting to build the client certificate chain.
  400. .IP "\fB\-chainCApath directory\fR" 4
  401. .IX Item "-chainCApath directory"
  402. The directory to use for building the chain provided to the server. This
  403. directory must be in \*(L"hash format\*(R", see \fBverify\fR\|(1) for more information.
  404. .IP "\fB\-chainCAfile file\fR" 4
  405. .IX Item "-chainCAfile file"
  406. A file containing trusted certificates to use when attempting to build the
  407. client certificate chain.
  408. .IP "\fB\-no\-CAfile\fR" 4
  409. .IX Item "-no-CAfile"
  410. Do not load the trusted \s-1CA\s0 certificates from the default file location
  411. .IP "\fB\-no\-CApath\fR" 4
  412. .IX Item "-no-CApath"
  413. Do not load the trusted \s-1CA\s0 certificates from the default directory location
  414. .IP "\fB\-requestCAfile file\fR" 4
  415. .IX Item "-requestCAfile file"
  416. A file containing a list of certificates whose subject names will be sent
  417. to the server in the \fBcertificate_authorities\fR extension. Only supported
  418. for \s-1TLS 1.3\s0
  419. .IP "\fB\-dane_tlsa_domain domain\fR" 4
  420. .IX Item "-dane_tlsa_domain domain"
  421. Enable \s-1RFC6698/RFC7671 DANE TLSA\s0 authentication and specify the
  422. \&\s-1TLSA\s0 base domain which becomes the default \s-1SNI\s0 hint and the primary
  423. reference identifier for hostname checks. This must be used in
  424. combination with at least one instance of the \fB\-dane_tlsa_rrdata\fR
  425. option below.
  426. .Sp
  427. When \s-1DANE\s0 authentication succeeds, the diagnostic output will include
  428. the lowest (closest to 0) depth at which a \s-1TLSA\s0 record authenticated
  429. a chain certificate. When that \s-1TLSA\s0 record is a \*(L"2 1 0\*(R" trust
  430. anchor public key that signed (rather than matched) the top-most
  431. certificate of the chain, the result is reported as \*(L"\s-1TA\s0 public key
  432. verified\*(R". Otherwise, either the \s-1TLSA\s0 record \*(L"matched \s-1TA\s0 certificate\*(R"
  433. at a positive depth or else \*(L"matched \s-1EE\s0 certificate\*(R" at depth 0.
  434. .IP "\fB\-dane_tlsa_rrdata rrdata\fR" 4
  435. .IX Item "-dane_tlsa_rrdata rrdata"
  436. Use one or more times to specify the \s-1RRDATA\s0 fields of the \s-1DANE TLSA\s0
  437. RRset associated with the target service. The \fBrrdata\fR value is
  438. specified in \*(L"presentation form\*(R", that is four whitespace separated
  439. fields that specify the usage, selector, matching type and associated
  440. data, with the last of these encoded in hexadecimal. Optional
  441. whitespace is ignored in the associated data field. For example:
  442. .Sp
  443. .Vb 12
  444. \& $ openssl s_client \-brief \-starttls smtp \e
  445. \& \-connect smtp.example.com:25 \e
  446. \& \-dane_tlsa_domain smtp.example.com \e
  447. \& \-dane_tlsa_rrdata "2 1 1
  448. \& B111DD8A1C2091A89BD4FD60C57F0716CCE50FEEFF8137CDBEE0326E 02CF362B" \e
  449. \& \-dane_tlsa_rrdata "2 1 1
  450. \& 60B87575447DCBA2A36B7D11AC09FB24A9DB406FEE12D2CC90180517 616E8A18"
  451. \& ...
  452. \& Verification: OK
  453. \& Verified peername: smtp.example.com
  454. \& DANE TLSA 2 1 1 ...ee12d2cc90180517616e8a18 matched TA certificate at depth 1
  455. \& ...
  456. .Ve
  457. .IP "\fB\-dane_ee_no_namechecks\fR" 4
  458. .IX Item "-dane_ee_no_namechecks"
  459. This disables server name checks when authenticating via \s-1\fBDANE\-EE\s0\fR\|(3) \s-1TLSA\s0
  460. records.
  461. For some applications, primarily web browsers, it is not safe to disable name
  462. checks due to \*(L"unknown key share\*(R" attacks, in which a malicious server can
  463. convince a client that a connection to a victim server is instead a secure
  464. connection to the malicious server.
  465. The malicious server may then be able to violate cross-origin scripting
  466. restrictions.
  467. Thus, despite the text of \s-1RFC7671,\s0 name checks are by default enabled for
  468. \&\s-1\fBDANE\-EE\s0\fR\|(3) \s-1TLSA\s0 records, and can be disabled in applications where it is safe
  469. to do so.
  470. In particular, \s-1SMTP\s0 and \s-1XMPP\s0 clients should set this option as \s-1SRV\s0 and \s-1MX\s0
  471. records already make it possible for a remote domain to redirect client
  472. connections to any server of its choice, and in any case \s-1SMTP\s0 and \s-1XMPP\s0 clients
  473. do not execute scripts downloaded from remote servers.
  474. .IP "\fB\-attime\fR, \fB\-check_ss_sig\fR, \fB\-crl_check\fR, \fB\-crl_check_all\fR, \fB\-explicit_policy\fR, \fB\-extended_crl\fR, \fB\-ignore_critical\fR, \fB\-inhibit_any\fR, \fB\-inhibit_map\fR, \fB\-no_alt_chains\fR, \fB\-no_check_time\fR, \fB\-partial_chain\fR, \fB\-policy\fR, \fB\-policy_check\fR, \fB\-policy_print\fR, \fB\-purpose\fR, \fB\-suiteB_128\fR, \fB\-suiteB_128_only\fR, \fB\-suiteB_192\fR, \fB\-trusted_first\fR, \fB\-use_deltas\fR, \fB\-auth_level\fR, \fB\-verify_depth\fR, \fB\-verify_email\fR, \fB\-verify_hostname\fR, \fB\-verify_ip\fR, \fB\-verify_name\fR, \fB\-x509_strict\fR" 4
  475. .IX Item "-attime, -check_ss_sig, -crl_check, -crl_check_all, -explicit_policy, -extended_crl, -ignore_critical, -inhibit_any, -inhibit_map, -no_alt_chains, -no_check_time, -partial_chain, -policy, -policy_check, -policy_print, -purpose, -suiteB_128, -suiteB_128_only, -suiteB_192, -trusted_first, -use_deltas, -auth_level, -verify_depth, -verify_email, -verify_hostname, -verify_ip, -verify_name, -x509_strict"
  476. Set various certificate chain validation options. See the
  477. \&\fBverify\fR\|(1) manual page for details.
  478. .IP "\fB\-reconnect\fR" 4
  479. .IX Item "-reconnect"
  480. Reconnects to the same server 5 times using the same session \s-1ID,\s0 this can
  481. be used as a test that session caching is working.
  482. .IP "\fB\-showcerts\fR" 4
  483. .IX Item "-showcerts"
  484. Displays the server certificate list as sent by the server: it only consists of
  485. certificates the server has sent (in the order the server has sent them). It is
  486. \&\fBnot\fR a verified chain.
  487. .IP "\fB\-prexit\fR" 4
  488. .IX Item "-prexit"
  489. Print session information when the program exits. This will always attempt
  490. to print out information even if the connection fails. Normally information
  491. will only be printed out once if the connection succeeds. This option is useful
  492. because the cipher in use may be renegotiated or the connection may fail
  493. because a client certificate is required or is requested only after an
  494. attempt is made to access a certain \s-1URL.\s0 Note: the output produced by this
  495. option is not always accurate because a connection might never have been
  496. established.
  497. .IP "\fB\-state\fR" 4
  498. .IX Item "-state"
  499. Prints out the \s-1SSL\s0 session states.
  500. .IP "\fB\-debug\fR" 4
  501. .IX Item "-debug"
  502. Print extensive debugging information including a hex dump of all traffic.
  503. .IP "\fB\-msg\fR" 4
  504. .IX Item "-msg"
  505. Show all protocol messages with hex dump.
  506. .IP "\fB\-trace\fR" 4
  507. .IX Item "-trace"
  508. Show verbose trace output of protocol messages. OpenSSL needs to be compiled
  509. with \fBenable-ssl-trace\fR for this option to work.
  510. .IP "\fB\-msgfile\fR" 4
  511. .IX Item "-msgfile"
  512. File to send output of \fB\-msg\fR or \fB\-trace\fR to, default standard output.
  513. .IP "\fB\-nbio_test\fR" 4
  514. .IX Item "-nbio_test"
  515. Tests nonblocking I/O
  516. .IP "\fB\-nbio\fR" 4
  517. .IX Item "-nbio"
  518. Turns on nonblocking I/O
  519. .IP "\fB\-crlf\fR" 4
  520. .IX Item "-crlf"
  521. This option translated a line feed from the terminal into \s-1CR+LF\s0 as required
  522. by some servers.
  523. .IP "\fB\-ign_eof\fR" 4
  524. .IX Item "-ign_eof"
  525. Inhibit shutting down the connection when end of file is reached in the
  526. input.
  527. .IP "\fB\-quiet\fR" 4
  528. .IX Item "-quiet"
  529. Inhibit printing of session and certificate information. This implicitly
  530. turns on \fB\-ign_eof\fR as well.
  531. .IP "\fB\-no_ign_eof\fR" 4
  532. .IX Item "-no_ign_eof"
  533. Shut down the connection when end of file is reached in the input.
  534. Can be used to override the implicit \fB\-ign_eof\fR after \fB\-quiet\fR.
  535. .IP "\fB\-psk_identity identity\fR" 4
  536. .IX Item "-psk_identity identity"
  537. Use the \s-1PSK\s0 identity \fBidentity\fR when using a \s-1PSK\s0 cipher suite.
  538. The default value is \*(L"Client_identity\*(R" (without the quotes).
  539. .IP "\fB\-psk key\fR" 4
  540. .IX Item "-psk key"
  541. Use the \s-1PSK\s0 key \fBkey\fR when using a \s-1PSK\s0 cipher suite. The key is
  542. given as a hexadecimal number without leading 0x, for example \-psk
  543. 1a2b3c4d.
  544. This option must be provided in order to use a \s-1PSK\s0 cipher.
  545. .IP "\fB\-psk_session file\fR" 4
  546. .IX Item "-psk_session file"
  547. Use the pem encoded \s-1SSL_SESSION\s0 data stored in \fBfile\fR as the basis of a \s-1PSK.\s0
  548. Note that this will only work if TLSv1.3 is negotiated.
  549. .IP "\fB\-ssl3\fR, \fB\-tls1\fR, \fB\-tls1_1\fR, \fB\-tls1_2\fR, \fB\-tls1_3\fR, \fB\-no_ssl3\fR, \fB\-no_tls1\fR, \fB\-no_tls1_1\fR, \fB\-no_tls1_2\fR, \fB\-no_tls1_3\fR" 4
  550. .IX Item "-ssl3, -tls1, -tls1_1, -tls1_2, -tls1_3, -no_ssl3, -no_tls1, -no_tls1_1, -no_tls1_2, -no_tls1_3"
  551. These options require or disable the use of the specified \s-1SSL\s0 or \s-1TLS\s0 protocols.
  552. By default \fBs_client\fR will negotiate the highest mutually supported protocol
  553. version.
  554. When a specific \s-1TLS\s0 version is required, only that version will be offered to
  555. and accepted from the server.
  556. Note that not all protocols and flags may be available, depending on how
  557. OpenSSL was built.
  558. .IP "\fB\-dtls\fR, \fB\-dtls1\fR, \fB\-dtls1_2\fR" 4
  559. .IX Item "-dtls, -dtls1, -dtls1_2"
  560. These options make \fBs_client\fR use \s-1DTLS\s0 protocols instead of \s-1TLS.\s0
  561. With \fB\-dtls\fR, \fBs_client\fR will negotiate any supported \s-1DTLS\s0 protocol version,
  562. whilst \fB\-dtls1\fR and \fB\-dtls1_2\fR will only support \s-1DTLS1.0\s0 and \s-1DTLS1.2\s0
  563. respectively.
  564. .IP "\fB\-sctp\fR" 4
  565. .IX Item "-sctp"
  566. Use \s-1SCTP\s0 for the transport protocol instead of \s-1UDP\s0 in \s-1DTLS.\s0 Must be used in
  567. conjunction with \fB\-dtls\fR, \fB\-dtls1\fR or \fB\-dtls1_2\fR. This option is only
  568. available where OpenSSL has support for \s-1SCTP\s0 enabled.
  569. .IP "\fB\-sctp_label_bug\fR" 4
  570. .IX Item "-sctp_label_bug"
  571. Use the incorrect behaviour of older OpenSSL implementations when computing
  572. endpoint-pair shared secrets for \s-1DTLS/SCTP.\s0 This allows communication with
  573. older broken implementations but breaks interoperability with correct
  574. implementations. Must be used in conjunction with \fB\-sctp\fR. This option is only
  575. available where OpenSSL has support for \s-1SCTP\s0 enabled.
  576. .IP "\fB\-fallback_scsv\fR" 4
  577. .IX Item "-fallback_scsv"
  578. Send \s-1TLS_FALLBACK_SCSV\s0 in the ClientHello.
  579. .IP "\fB\-async\fR" 4
  580. .IX Item "-async"
  581. Switch on asynchronous mode. Cryptographic operations will be performed
  582. asynchronously. This will only have an effect if an asynchronous capable engine
  583. is also used via the \fB\-engine\fR option. For test purposes the dummy async engine
  584. (dasync) can be used (if available).
  585. .IP "\fB\-max_send_frag int\fR" 4
  586. .IX Item "-max_send_frag int"
  587. The maximum size of data fragment to send.
  588. See \fBSSL_CTX_set_max_send_fragment\fR\|(3) for further information.
  589. .IP "\fB\-split_send_frag int\fR" 4
  590. .IX Item "-split_send_frag int"
  591. The size used to split data for encrypt pipelines. If more data is written in
  592. one go than this value then it will be split into multiple pipelines, up to the
  593. maximum number of pipelines defined by max_pipelines. This only has an effect if
  594. a suitable cipher suite has been negotiated, an engine that supports pipelining
  595. has been loaded, and max_pipelines is greater than 1. See
  596. \&\fBSSL_CTX_set_split_send_fragment\fR\|(3) for further information.
  597. .IP "\fB\-max_pipelines int\fR" 4
  598. .IX Item "-max_pipelines int"
  599. The maximum number of encrypt/decrypt pipelines to be used. This will only have
  600. an effect if an engine has been loaded that supports pipelining (e.g. the dasync
  601. engine) and a suitable cipher suite has been negotiated. The default value is 1.
  602. See \fBSSL_CTX_set_max_pipelines\fR\|(3) for further information.
  603. .IP "\fB\-read_buf int\fR" 4
  604. .IX Item "-read_buf int"
  605. The default read buffer size to be used for connections. This will only have an
  606. effect if the buffer size is larger than the size that would otherwise be used
  607. and pipelining is in use (see \fBSSL_CTX_set_default_read_buffer_len\fR\|(3) for
  608. further information).
  609. .IP "\fB\-bugs\fR" 4
  610. .IX Item "-bugs"
  611. There are several known bugs in \s-1SSL\s0 and \s-1TLS\s0 implementations. Adding this
  612. option enables various workarounds.
  613. .IP "\fB\-comp\fR" 4
  614. .IX Item "-comp"
  615. Enables support for \s-1SSL/TLS\s0 compression.
  616. This option was introduced in OpenSSL 1.1.0.
  617. \&\s-1TLS\s0 compression is not recommended and is off by default as of
  618. OpenSSL 1.1.0.
  619. .IP "\fB\-no_comp\fR" 4
  620. .IX Item "-no_comp"
  621. Disables support for \s-1SSL/TLS\s0 compression.
  622. \&\s-1TLS\s0 compression is not recommended and is off by default as of
  623. OpenSSL 1.1.0.
  624. .IP "\fB\-brief\fR" 4
  625. .IX Item "-brief"
  626. Only provide a brief summary of connection parameters instead of the
  627. normal verbose output.
  628. .IP "\fB\-sigalgs sigalglist\fR" 4
  629. .IX Item "-sigalgs sigalglist"
  630. Specifies the list of signature algorithms that are sent by the client.
  631. The server selects one entry in the list based on its preferences.
  632. For example strings, see \fBSSL_CTX_set1_sigalgs\fR\|(3)
  633. .IP "\fB\-curves curvelist\fR" 4
  634. .IX Item "-curves curvelist"
  635. Specifies the list of supported curves to be sent by the client. The curve is
  636. ultimately selected by the server. For a list of all curves, use:
  637. .Sp
  638. .Vb 1
  639. \& $ openssl ecparam \-list_curves
  640. .Ve
  641. .IP "\fB\-cipher cipherlist\fR" 4
  642. .IX Item "-cipher cipherlist"
  643. This allows the TLSv1.2 and below cipher list sent by the client to be modified.
  644. This list will be combined with any TLSv1.3 ciphersuites that have been
  645. configured. Although the server determines which ciphersuite is used it should
  646. take the first supported cipher in the list sent by the client. See the
  647. \&\fBciphers\fR command for more information.
  648. .IP "\fB\-ciphersuites val\fR" 4
  649. .IX Item "-ciphersuites val"
  650. This allows the TLSv1.3 ciphersuites sent by the client to be modified. This
  651. list will be combined with any TLSv1.2 and below ciphersuites that have been
  652. configured. Although the server determines which cipher suite is used it should
  653. take the first supported cipher in the list sent by the client. See the
  654. \&\fBciphers\fR command for more information. The format for this list is a simple
  655. colon (\*(L":\*(R") separated list of TLSv1.3 ciphersuite names.
  656. .IP "\fB\-starttls protocol\fR" 4
  657. .IX Item "-starttls protocol"
  658. Send the protocol-specific message(s) to switch to \s-1TLS\s0 for communication.
  659. \&\fBprotocol\fR is a keyword for the intended protocol. Currently, the only
  660. supported keywords are \*(L"smtp\*(R", \*(L"pop3\*(R", \*(L"imap\*(R", \*(L"ftp\*(R", \*(L"xmpp\*(R", \*(L"xmpp-server\*(R",
  661. \&\*(L"irc\*(R", \*(L"postgres\*(R", \*(L"mysql\*(R", \*(L"lmtp\*(R", \*(L"nntp\*(R", \*(L"sieve\*(R" and \*(L"ldap\*(R".
  662. .IP "\fB\-xmpphost hostname\fR" 4
  663. .IX Item "-xmpphost hostname"
  664. This option, when used with \*(L"\-starttls xmpp\*(R" or \*(L"\-starttls xmpp-server\*(R",
  665. specifies the host for the \*(L"to\*(R" attribute of the stream element.
  666. If this option is not specified, then the host specified with \*(L"\-connect\*(R"
  667. will be used.
  668. .Sp
  669. This option is an alias of the \fB\-name\fR option for \*(L"xmpp\*(R" and \*(L"xmpp-server\*(R".
  670. .IP "\fB\-name hostname\fR" 4
  671. .IX Item "-name hostname"
  672. This option is used to specify hostname information for various protocols
  673. used with \fB\-starttls\fR option. Currently only \*(L"xmpp\*(R", \*(L"xmpp-server\*(R",
  674. \&\*(L"smtp\*(R" and \*(L"lmtp\*(R" can utilize this \fB\-name\fR option.
  675. .Sp
  676. If this option is used with \*(L"\-starttls xmpp\*(R" or \*(L"\-starttls xmpp-server\*(R",
  677. if specifies the host for the \*(L"to\*(R" attribute of the stream element. If this
  678. option is not specified, then the host specified with \*(L"\-connect\*(R" will be used.
  679. .Sp
  680. If this option is used with \*(L"\-starttls lmtp\*(R" or \*(L"\-starttls smtp\*(R", it specifies
  681. the name to use in the \*(L"\s-1LMTP LHLO\*(R"\s0 or \*(L"\s-1SMTP EHLO\*(R"\s0 message, respectively. If
  682. this option is not specified, then \*(L"mail.example.com\*(R" will be used.
  683. .IP "\fB\-tlsextdebug\fR" 4
  684. .IX Item "-tlsextdebug"
  685. Print out a hex dump of any \s-1TLS\s0 extensions received from the server.
  686. .IP "\fB\-no_ticket\fR" 4
  687. .IX Item "-no_ticket"
  688. Disable RFC4507bis session ticket support.
  689. .IP "\fB\-sess_out filename\fR" 4
  690. .IX Item "-sess_out filename"
  691. Output \s-1SSL\s0 session to \fBfilename\fR.
  692. .IP "\fB\-sess_in sess.pem\fR" 4
  693. .IX Item "-sess_in sess.pem"
  694. Load \s-1SSL\s0 session from \fBfilename\fR. The client will attempt to resume a
  695. connection from this session.
  696. .IP "\fB\-engine id\fR" 4
  697. .IX Item "-engine id"
  698. Specifying an engine (by its unique \fBid\fR string) will cause \fBs_client\fR
  699. to attempt to obtain a functional reference to the specified engine,
  700. thus initialising it if needed. The engine will then be set as the default
  701. for all available algorithms.
  702. .IP "\fB\-rand file...\fR" 4
  703. .IX Item "-rand file..."
  704. A file or files containing random data used to seed the random number
  705. generator.
  706. Multiple files can be specified separated by an OS-dependent character.
  707. The separator is \fB;\fR for MS-Windows, \fB,\fR for OpenVMS, and \fB:\fR for
  708. all others.
  709. .IP "[\fB\-writerand file\fR]" 4
  710. .IX Item "[-writerand file]"
  711. Writes random data to the specified \fIfile\fR upon exit.
  712. This can be used with a subsequent \fB\-rand\fR flag.
  713. .IP "\fB\-serverinfo types\fR" 4
  714. .IX Item "-serverinfo types"
  715. A list of comma-separated \s-1TLS\s0 Extension Types (numbers between 0 and
  716. 65535). Each type will be sent as an empty ClientHello \s-1TLS\s0 Extension.
  717. The server's response (if any) will be encoded and displayed as a \s-1PEM\s0
  718. file.
  719. .IP "\fB\-status\fR" 4
  720. .IX Item "-status"
  721. Sends a certificate status request to the server (\s-1OCSP\s0 stapling). The server
  722. response (if any) is printed out.
  723. .IP "\fB\-alpn protocols\fR, \fB\-nextprotoneg protocols\fR" 4
  724. .IX Item "-alpn protocols, -nextprotoneg protocols"
  725. These flags enable the Enable the Application-Layer Protocol Negotiation
  726. or Next Protocol Negotiation (\s-1NPN\s0) extension, respectively. \s-1ALPN\s0 is the
  727. \&\s-1IETF\s0 standard and replaces \s-1NPN.\s0
  728. The \fBprotocols\fR list is a comma-separated list of protocol names that
  729. the client should advertise support for. The list should contain the most
  730. desirable protocols first. Protocol names are printable \s-1ASCII\s0 strings,
  731. for example \*(L"http/1.1\*(R" or \*(L"spdy/3\*(R".
  732. An empty list of protocols is treated specially and will cause the
  733. client to advertise support for the \s-1TLS\s0 extension but disconnect just
  734. after receiving ServerHello with a list of server supported protocols.
  735. The flag \fB\-nextprotoneg\fR cannot be specified if \fB\-tls1_3\fR is used.
  736. .IP "\fB\-ct\fR, \fB\-noct\fR" 4
  737. .IX Item "-ct, -noct"
  738. Use one of these two options to control whether Certificate Transparency (\s-1CT\s0)
  739. is enabled (\fB\-ct\fR) or disabled (\fB\-noct\fR).
  740. If \s-1CT\s0 is enabled, signed certificate timestamps (SCTs) will be requested from
  741. the server and reported at handshake completion.
  742. .Sp
  743. Enabling \s-1CT\s0 also enables \s-1OCSP\s0 stapling, as this is one possible delivery method
  744. for SCTs.
  745. .IP "\fB\-ctlogfile\fR" 4
  746. .IX Item "-ctlogfile"
  747. A file containing a list of known Certificate Transparency logs. See
  748. \&\fBSSL_CTX_set_ctlog_list_file\fR\|(3) for the expected file format.
  749. .IP "\fB\-keylogfile file\fR" 4
  750. .IX Item "-keylogfile file"
  751. Appends \s-1TLS\s0 secrets to the specified keylog file such that external programs
  752. (like Wireshark) can decrypt \s-1TLS\s0 connections.
  753. .IP "\fB\-early_data file\fR" 4
  754. .IX Item "-early_data file"
  755. Reads the contents of the specified file and attempts to send it as early data
  756. to the server. This will only work with resumed sessions that support early
  757. data and when the server accepts the early data.
  758. .IP "\fB\-enable_pha\fR" 4
  759. .IX Item "-enable_pha"
  760. For TLSv1.3 only, send the Post-Handshake Authentication extension. This will
  761. happen whether or not a certificate has been provided via \fB\-cert\fR.
  762. .IP "\fB[target]\fR" 4
  763. .IX Item "[target]"
  764. Rather than providing \fB\-connect\fR, the target hostname and optional port may
  765. be provided as a single positional argument after all options. If neither this
  766. nor \fB\-connect\fR are provided, falls back to attempting to connect to localhost
  767. on port 4433.
  768. .SH "CONNECTED COMMANDS"
  769. .IX Header "CONNECTED COMMANDS"
  770. If a connection is established with an \s-1SSL\s0 server then any data received
  771. from the server is displayed and any key presses will be sent to the
  772. server. If end of file is reached then the connection will be closed down. When
  773. used interactively (which means neither \fB\-quiet\fR nor \fB\-ign_eof\fR have been
  774. given), then certain commands are also recognized which perform special
  775. operations. These commands are a letter which must appear at the start of a
  776. line. They are listed below.
  777. .IP "\fBQ\fR" 4
  778. .IX Item "Q"
  779. End the current \s-1SSL\s0 connection and exit.
  780. .IP "\fBR\fR" 4
  781. .IX Item "R"
  782. Renegotiate the \s-1SSL\s0 session (TLSv1.2 and below only).
  783. .IP "\fBB\fR" 4
  784. .IX Item "B"
  785. Send a heartbeat message to the server (\s-1DTLS\s0 only)
  786. .IP "\fBk\fR" 4
  787. .IX Item "k"
  788. Send a key update message to the server (TLSv1.3 only)
  789. .IP "\fBK\fR" 4
  790. .IX Item "K"
  791. Send a key update message to the server and request one back (TLSv1.3 only)
  792. .SH "NOTES"
  793. .IX Header "NOTES"
  794. \&\fBs_client\fR can be used to debug \s-1SSL\s0 servers. To connect to an \s-1SSL HTTP\s0
  795. server the command:
  796. .PP
  797. .Vb 1
  798. \& openssl s_client \-connect servername:443
  799. .Ve
  800. .PP
  801. would typically be used (https uses port 443). If the connection succeeds
  802. then an \s-1HTTP\s0 command can be given such as \*(L"\s-1GET /\*(R"\s0 to retrieve a web page.
  803. .PP
  804. If the handshake fails then there are several possible causes, if it is
  805. nothing obvious like no client certificate then the \fB\-bugs\fR,
  806. \&\fB\-ssl3\fR, \fB\-tls1\fR, \fB\-no_ssl3\fR, \fB\-no_tls1\fR options can be tried
  807. in case it is a buggy server. In particular you should play with these
  808. options \fBbefore\fR submitting a bug report to an OpenSSL mailing list.
  809. .PP
  810. A frequent problem when attempting to get client certificates working
  811. is that a web client complains it has no certificates or gives an empty
  812. list to choose from. This is normally because the server is not sending
  813. the clients certificate authority in its \*(L"acceptable \s-1CA\s0 list\*(R" when it
  814. requests a certificate. By using \fBs_client\fR the \s-1CA\s0 list can be viewed
  815. and checked. However, some servers only request client authentication
  816. after a specific \s-1URL\s0 is requested. To obtain the list in this case it
  817. is necessary to use the \fB\-prexit\fR option and send an \s-1HTTP\s0 request
  818. for an appropriate page.
  819. .PP
  820. If a certificate is specified on the command line using the \fB\-cert\fR
  821. option it will not be used unless the server specifically requests
  822. a client certificate. Therefore, merely including a client certificate
  823. on the command line is no guarantee that the certificate works.
  824. .PP
  825. If there are problems verifying a server certificate then the
  826. \&\fB\-showcerts\fR option can be used to show all the certificates sent by the
  827. server.
  828. .PP
  829. The \fBs_client\fR utility is a test tool and is designed to continue the
  830. handshake after any certificate verification errors. As a result it will
  831. accept any certificate chain (trusted or not) sent by the peer. Non-test
  832. applications should \fBnot\fR do this as it makes them vulnerable to a \s-1MITM\s0
  833. attack. This behaviour can be changed by with the \fB\-verify_return_error\fR
  834. option: any verify errors are then returned aborting the handshake.
  835. .PP
  836. The \fB\-bind\fR option may be useful if the server or a firewall requires
  837. connections to come from some particular address and or port.
  838. .SH "BUGS"
  839. .IX Header "BUGS"
  840. Because this program has a lot of options and also because some of the
  841. techniques used are rather old, the C source of \fBs_client\fR is rather hard to
  842. read and not a model of how things should be done.
  843. A typical \s-1SSL\s0 client program would be much simpler.
  844. .PP
  845. The \fB\-prexit\fR option is a bit of a hack. We should really report
  846. information whenever a session is renegotiated.
  847. .SH "SEE ALSO"
  848. .IX Header "SEE ALSO"
  849. \&\fBSSL_CONF_cmd\fR\|(3), \fBsess_id\fR\|(1), \fBs_server\fR\|(1), \fBciphers\fR\|(1),
  850. \&\fBSSL_CTX_set_max_send_fragment\fR\|(3), \fBSSL_CTX_set_split_send_fragment\fR\|(3),
  851. \&\fBSSL_CTX_set_max_pipelines\fR\|(3)
  852. .SH "HISTORY"
  853. .IX Header "HISTORY"
  854. The \fB\-no_alt_chains\fR option was added in OpenSSL 1.1.0.
  855. The \fB\-name\fR option was added in OpenSSL 1.1.1.
  856. .SH "COPYRIGHT"
  857. .IX Header "COPYRIGHT"
  858. Copyright 2000\-2021 The OpenSSL Project Authors. All Rights Reserved.
  859. .PP
  860. Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
  861. this file except in compliance with the License. You can obtain a copy
  862. in the file \s-1LICENSE\s0 in the source distribution or at
  863. <https://www.openssl.org/source/license.html>.