s_server.pod 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752
  1. =pod
  2. =head1 NAME
  3. openssl-s_server,
  4. s_server - SSL/TLS server program
  5. =head1 SYNOPSIS
  6. B<openssl> B<s_server>
  7. [B<-help>]
  8. [B<-port +int>]
  9. [B<-accept val>]
  10. [B<-unix val>]
  11. [B<-4>]
  12. [B<-6>]
  13. [B<-unlink>]
  14. [B<-context val>]
  15. [B<-verify int>]
  16. [B<-Verify int>]
  17. [B<-cert infile>]
  18. [B<-nameopt val>]
  19. [B<-naccept +int>]
  20. [B<-serverinfo val>]
  21. [B<-certform PEM|DER>]
  22. [B<-key infile>]
  23. [B<-keyform format>]
  24. [B<-pass val>]
  25. [B<-dcert infile>]
  26. [B<-dcertform PEM|DER>]
  27. [B<-dkey infile>]
  28. [B<-dkeyform PEM|DER>]
  29. [B<-dpass val>]
  30. [B<-nbio_test>]
  31. [B<-crlf>]
  32. [B<-debug>]
  33. [B<-msg>]
  34. [B<-msgfile outfile>]
  35. [B<-state>]
  36. [B<-CAfile infile>]
  37. [B<-CApath dir>]
  38. [B<-no-CAfile>]
  39. [B<-no-CApath>]
  40. [B<-nocert>]
  41. [B<-quiet>]
  42. [B<-no_resume_ephemeral>]
  43. [B<-www>]
  44. [B<-WWW>]
  45. [B<-servername>]
  46. [B<-servername_fatal>]
  47. [B<-cert2 infile>]
  48. [B<-key2 infile>]
  49. [B<-tlsextdebug>]
  50. [B<-HTTP>]
  51. [B<-id_prefix val>]
  52. [B<-rand file...>]
  53. [B<-writerand file>]
  54. [B<-keymatexport val>]
  55. [B<-keymatexportlen +int>]
  56. [B<-CRL infile>]
  57. [B<-crl_download>]
  58. [B<-cert_chain infile>]
  59. [B<-dcert_chain infile>]
  60. [B<-chainCApath dir>]
  61. [B<-verifyCApath dir>]
  62. [B<-no_cache>]
  63. [B<-ext_cache>]
  64. [B<-CRLform PEM|DER>]
  65. [B<-verify_return_error>]
  66. [B<-verify_quiet>]
  67. [B<-build_chain>]
  68. [B<-chainCAfile infile>]
  69. [B<-verifyCAfile infile>]
  70. [B<-ign_eof>]
  71. [B<-no_ign_eof>]
  72. [B<-status>]
  73. [B<-status_verbose>]
  74. [B<-status_timeout int>]
  75. [B<-status_url val>]
  76. [B<-status_file infile>]
  77. [B<-trace>]
  78. [B<-security_debug>]
  79. [B<-security_debug_verbose>]
  80. [B<-brief>]
  81. [B<-rev>]
  82. [B<-async>]
  83. [B<-ssl_config val>]
  84. [B<-max_send_frag +int>]
  85. [B<-split_send_frag +int>]
  86. [B<-max_pipelines +int>]
  87. [B<-read_buf +int>]
  88. [B<-no_ssl3>]
  89. [B<-no_tls1>]
  90. [B<-no_tls1_1>]
  91. [B<-no_tls1_2>]
  92. [B<-no_tls1_3>]
  93. [B<-bugs>]
  94. [B<-no_comp>]
  95. [B<-comp>]
  96. [B<-no_ticket>]
  97. [B<-serverpref>]
  98. [B<-legacy_renegotiation>]
  99. [B<-no_renegotiation>]
  100. [B<-legacy_server_connect>]
  101. [B<-no_resumption_on_reneg>]
  102. [B<-no_legacy_server_connect>]
  103. [B<-allow_no_dhe_kex>]
  104. [B<-prioritize_chacha>]
  105. [B<-strict>]
  106. [B<-sigalgs val>]
  107. [B<-client_sigalgs val>]
  108. [B<-groups val>]
  109. [B<-curves val>]
  110. [B<-named_curve val>]
  111. [B<-cipher val>]
  112. [B<-ciphersuites val>]
  113. [B<-dhparam infile>]
  114. [B<-record_padding val>]
  115. [B<-debug_broken_protocol>]
  116. [B<-policy val>]
  117. [B<-purpose val>]
  118. [B<-verify_name val>]
  119. [B<-verify_depth int>]
  120. [B<-auth_level int>]
  121. [B<-attime intmax>]
  122. [B<-verify_hostname val>]
  123. [B<-verify_email val>]
  124. [B<-verify_ip>]
  125. [B<-ignore_critical>]
  126. [B<-issuer_checks>]
  127. [B<-crl_check>]
  128. [B<-crl_check_all>]
  129. [B<-policy_check>]
  130. [B<-explicit_policy>]
  131. [B<-inhibit_any>]
  132. [B<-inhibit_map>]
  133. [B<-x509_strict>]
  134. [B<-extended_crl>]
  135. [B<-use_deltas>]
  136. [B<-policy_print>]
  137. [B<-check_ss_sig>]
  138. [B<-trusted_first>]
  139. [B<-suiteB_128_only>]
  140. [B<-suiteB_128>]
  141. [B<-suiteB_192>]
  142. [B<-partial_chain>]
  143. [B<-no_alt_chains>]
  144. [B<-no_check_time>]
  145. [B<-allow_proxy_certs>]
  146. [B<-xkey>]
  147. [B<-xcert>]
  148. [B<-xchain>]
  149. [B<-xchain_build>]
  150. [B<-xcertform PEM|DER>]
  151. [B<-xkeyform PEM|DER>]
  152. [B<-nbio>]
  153. [B<-psk_identity val>]
  154. [B<-psk_hint val>]
  155. [B<-psk val>]
  156. [B<-srpvfile infile>]
  157. [B<-srpuserseed val>]
  158. [B<-ssl3>]
  159. [B<-tls1>]
  160. [B<-tls1_1>]
  161. [B<-tls1_2>]
  162. [B<-tls1_3>]
  163. [B<-dtls>]
  164. [B<-timeout>]
  165. [B<-mtu +int>]
  166. [B<-listen>]
  167. [B<-dtls1>]
  168. [B<-dtls1_2>]
  169. [B<-sctp>]
  170. [B<-no_dhe>]
  171. [B<-nextprotoneg val>]
  172. [B<-use_srtp val>]
  173. [B<-alpn val>]
  174. [B<-engine val>]
  175. [B<-keylogfile outfile>]
  176. [B<-max_early_data int>]
  177. [B<-early_data>]
  178. =head1 DESCRIPTION
  179. The B<s_server> command implements a generic SSL/TLS server which listens
  180. for connections on a given port using SSL/TLS.
  181. =head1 OPTIONS
  182. In addition to the options below the B<s_server> utility also supports the
  183. common and server only options documented in the
  184. in the "Supported Command Line Commands" section of the L<SSL_CONF_cmd(3)>
  185. manual page.
  186. =over 4
  187. =item B<-help>
  188. Print out a usage message.
  189. =item B<-port +int>
  190. The TCP port to listen on for connections. If not specified 4433 is used.
  191. =item B<-accept val>
  192. The optional TCP host and port to listen on for connections. If not specified, *:4433 is used.
  193. =item B<-unix val>
  194. Unix domain socket to accept on.
  195. =item B<-4>
  196. Use IPv4 only.
  197. =item B<-6>
  198. Use IPv6 only.
  199. =item B<-unlink>
  200. For -unix, unlink any existing socket first.
  201. =item B<-context val>
  202. Sets the SSL context id. It can be given any string value. If this option
  203. is not present a default value will be used.
  204. =item B<-verify int>, B<-Verify int>
  205. The verify depth to use. This specifies the maximum length of the
  206. client certificate chain and makes the server request a certificate from
  207. the client. With the B<-verify> option a certificate is requested but the
  208. client does not have to send one, with the B<-Verify> option the client
  209. must supply a certificate or an error occurs.
  210. If the cipher suite cannot request a client certificate (for example an
  211. anonymous cipher suite or PSK) this option has no effect.
  212. =item B<-cert infile>
  213. The certificate to use, most servers cipher suites require the use of a
  214. certificate and some require a certificate with a certain public key type:
  215. for example the DSS cipher suites require a certificate containing a DSS
  216. (DSA) key. If not specified then the filename "server.pem" will be used.
  217. =item B<-nameopt val>
  218. Option which determines how the subject or issuer names are displayed. The
  219. B<val> argument can be a single option or multiple options separated by
  220. commas. Alternatively the B<-nameopt> switch may be used more than once to
  221. set multiple options. See the L<x509(1)> manual page for details.
  222. =item B<-naccept +int>
  223. The server will exit after receiving the specified number of connections,
  224. default unlimited.
  225. =item B<-serverinfo val>
  226. A file containing one or more blocks of PEM data. Each PEM block
  227. must encode a TLS ServerHello extension (2 bytes type, 2 bytes length,
  228. followed by "length" bytes of extension data). If the client sends
  229. an empty TLS ClientHello extension matching the type, the corresponding
  230. ServerHello extension will be returned.
  231. =item B<-certform PEM|DER>
  232. The certificate format to use: DER or PEM. PEM is the default.
  233. =item B<-key infile>
  234. The private key to use. If not specified then the certificate file will
  235. be used.
  236. =item B<-keyform format>
  237. The private format to use: DER or PEM. PEM is the default.
  238. =item B<-pass val>
  239. The private key password source. For more information about the format of B<val>
  240. see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>.
  241. =item B<-dcert infile>, B<-dkey infile>
  242. Specify an additional certificate and private key, these behave in the
  243. same manner as the B<-cert> and B<-key> options except there is no default
  244. if they are not specified (no additional certificate and key is used). As
  245. noted above some cipher suites require a certificate containing a key of
  246. a certain type. Some cipher suites need a certificate carrying an RSA key
  247. and some a DSS (DSA) key. By using RSA and DSS certificates and keys
  248. a server can support clients which only support RSA or DSS cipher suites
  249. by using an appropriate certificate.
  250. =item B<-dcertform PEM|DER>, B<-dkeyform PEM|DER>, B<-dpass val>
  251. Additional certificate and private key format and passphrase respectively.
  252. =item B<-nbio_test>
  253. Tests non blocking I/O.
  254. =item B<-crlf>
  255. This option translated a line feed from the terminal into CR+LF.
  256. =item B<-debug>
  257. Print extensive debugging information including a hex dump of all traffic.
  258. =item B<-msg>
  259. Show all protocol messages with hex dump.
  260. =item B<-msgfile outfile>
  261. File to send output of B<-msg> or B<-trace> to, default standard output.
  262. =item B<-state>
  263. Prints the SSL session states.
  264. =item B<-CAfile infile>
  265. A file containing trusted certificates to use during client authentication
  266. and to use when attempting to build the server certificate chain. The list
  267. is also used in the list of acceptable client CAs passed to the client when
  268. a certificate is requested.
  269. =item B<-CApath dir>
  270. The directory to use for client certificate verification. This directory
  271. must be in "hash format", see B<verify> for more information. These are
  272. also used when building the server certificate chain.
  273. =item B<-no-CAfile>
  274. Do not load the trusted CA certificates from the default file location.
  275. =item B<-no-CApath>
  276. Do not load the trusted CA certificates from the default directory location.
  277. =item B<-nocert>
  278. If this option is set then no certificate is used. This restricts the
  279. cipher suites available to the anonymous ones (currently just anonymous
  280. DH).
  281. =item B<-quiet>
  282. Inhibit printing of session and certificate information.
  283. =item B<-www>
  284. Sends a status message back to the client when it connects. This includes
  285. information about the ciphers used and various session parameters.
  286. The output is in HTML format so this option will normally be used with a
  287. web browser.
  288. =item B<-WWW>
  289. Emulates a simple web server. Pages will be resolved relative to the
  290. current directory, for example if the URL https://myhost/page.html is
  291. requested the file ./page.html will be loaded.
  292. =item B<-tlsextdebug>
  293. Print a hex dump of any TLS extensions received from the server.
  294. =item B<-HTTP>
  295. Emulates a simple web server. Pages will be resolved relative to the
  296. current directory, for example if the URL https://myhost/page.html is
  297. requested the file ./page.html will be loaded. The files loaded are
  298. assumed to contain a complete and correct HTTP response (lines that
  299. are part of the HTTP response line and headers must end with CRLF).
  300. =item B<-id_prefix val>
  301. Generate SSL/TLS session IDs prefixed by B<val>. This is mostly useful
  302. for testing any SSL/TLS code (eg. proxies) that wish to deal with multiple
  303. servers, when each of which might be generating a unique range of session
  304. IDs (eg. with a certain prefix).
  305. =item B<-rand file...>
  306. A file or files containing random data used to seed the random number
  307. generator.
  308. Multiple files can be specified separated by an OS-dependent character.
  309. The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
  310. all others.
  311. =item [B<-writerand file>]
  312. Writes random data to the specified I<file> upon exit.
  313. This can be used with a subsequent B<-rand> flag.
  314. =item B<-verify_return_error>
  315. Verification errors normally just print a message but allow the
  316. connection to continue, for debugging purposes.
  317. If this option is used, then verification errors close the connection.
  318. =item B<-status>
  319. Enables certificate status request support (aka OCSP stapling).
  320. =item B<-status_verbose>
  321. Enables certificate status request support (aka OCSP stapling) and gives
  322. a verbose printout of the OCSP response.
  323. =item B<-status_timeout int>
  324. Sets the timeout for OCSP response to B<int> seconds.
  325. =item B<-status_url val>
  326. Sets a fallback responder URL to use if no responder URL is present in the
  327. server certificate. Without this option an error is returned if the server
  328. certificate does not contain a responder address.
  329. =item B<-status_file infile>
  330. Overrides any OCSP responder URLs from the certificate and always provides the
  331. OCSP Response stored in the file. The file must be in DER format.
  332. =item B<-trace>
  333. Show verbose trace output of protocol messages. OpenSSL needs to be compiled
  334. with B<enable-ssl-trace> for this option to work.
  335. =item B<-brief>
  336. Provide a brief summary of connection parameters instead of the normal verbose
  337. output.
  338. =item B<-rev>
  339. Simple test server which just reverses the text received from the client
  340. and sends it back to the server. Also sets B<-brief>.
  341. =item B<-async>
  342. Switch on asynchronous mode. Cryptographic operations will be performed
  343. asynchronously. This will only have an effect if an asynchronous capable engine
  344. is also used via the B<-engine> option. For test purposes the dummy async engine
  345. (dasync) can be used (if available).
  346. =item B<-max_send_frag +int>
  347. The maximum size of data fragment to send.
  348. See L<SSL_CTX_set_max_send_fragment(3)> for further information.
  349. =item B<-split_send_frag +int>
  350. The size used to split data for encrypt pipelines. If more data is written in
  351. one go than this value then it will be split into multiple pipelines, up to the
  352. maximum number of pipelines defined by max_pipelines. This only has an effect if
  353. a suitable cipher suite has been negotiated, an engine that supports pipelining
  354. has been loaded, and max_pipelines is greater than 1. See
  355. L<SSL_CTX_set_split_send_fragment(3)> for further information.
  356. =item B<-max_pipelines +int>
  357. The maximum number of encrypt/decrypt pipelines to be used. This will only have
  358. an effect if an engine has been loaded that supports pipelining (e.g. the dasync
  359. engine) and a suitable cipher suite has been negotiated. The default value is 1.
  360. See L<SSL_CTX_set_max_pipelines(3)> for further information.
  361. =item B<-read_buf +int>
  362. The default read buffer size to be used for connections. This will only have an
  363. effect if the buffer size is larger than the size that would otherwise be used
  364. and pipelining is in use (see L<SSL_CTX_set_default_read_buffer_len(3)> for
  365. further information).
  366. =item B<-ssl2>, B<-ssl3>, B<-tls1>, B<-tls1_1>, B<-tls1_2>, B<-tls1_3>, B<-no_ssl2>, B<-no_ssl3>, B<-no_tls1>, B<-no_tls1_1>, B<-no_tls1_2>, B<-no_tls1_3>
  367. These options require or disable the use of the specified SSL or TLS protocols.
  368. By default B<s_server> will negotiate the highest mutually supported protocol
  369. version.
  370. When a specific TLS version is required, only that version will be accepted
  371. from the client.
  372. =item B<-bugs>
  373. There are several known bug in SSL and TLS implementations. Adding this
  374. option enables various workarounds.
  375. =item B<-no_comp>
  376. Disable negotiation of TLS compression.
  377. TLS compression is not recommended and is off by default as of
  378. OpenSSL 1.1.0.
  379. =item B<-comp>
  380. Enable negotiation of TLS compression.
  381. This option was introduced in OpenSSL 1.1.0.
  382. TLS compression is not recommended and is off by default as of
  383. OpenSSL 1.1.0.
  384. =item B<-no_ticket>
  385. Disable RFC4507bis session ticket support.
  386. =item B<-serverpref>
  387. Use the server's cipher preferences, rather than the client's preferences.
  388. =item B<-prioritize_chacha>
  389. Prioritize ChaCha ciphers when preferred by clients. Requires B<-serverpref>.
  390. =item B<-no_resumption_on_reneg>
  391. Set the B<SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION> option.
  392. =item B<-client_sigalgs val>
  393. Signature algorithms to support for client certificate authentication
  394. (colon-separated list).
  395. =item B<-named_curve val>
  396. Specifies the elliptic curve to use. NOTE: this is single curve, not a list.
  397. For a list of all possible curves, use:
  398. $ openssl ecparam -list_curves
  399. =item B<-cipher val>
  400. This allows the list of TLSv1.2 and below ciphersuites used by the server to be
  401. modified. This list is combined with any TLSv1.3 ciphersuites that have been
  402. configured. When the client sends a list of supported ciphers the first client
  403. cipher also included in the server list is used. Because the client specifies
  404. the preference order, the order of the server cipherlist is irrelevant. See
  405. the B<ciphers> command for more information.
  406. =item B<-ciphersuites val>
  407. This allows the list of TLSv1.3 ciphersuites used by the server to be modified.
  408. This list is combined with any TLSv1.2 and below ciphersuites that have been
  409. configured. When the client sends a list of supported ciphers the first client
  410. cipher also included in the server list is used. Because the client specifies
  411. the preference order, the order of the server cipherlist is irrelevant. See
  412. the B<ciphers> command for more information. The format for this list is a
  413. simple colon (":") separated list of TLSv1.3 ciphersuite names.
  414. =item B<-dhparam infile>
  415. The DH parameter file to use. The ephemeral DH cipher suites generate keys
  416. using a set of DH parameters. If not specified then an attempt is made to
  417. load the parameters from the server certificate file.
  418. If this fails then a static set of parameters hard coded into the B<s_server>
  419. program will be used.
  420. =item B<-attime>, B<-check_ss_sig>, B<-crl_check>, B<-crl_check_all>,
  421. B<-explicit_policy>, B<-extended_crl>, B<-ignore_critical>, B<-inhibit_any>,
  422. B<-inhibit_map>, B<-no_alt_chains>, B<-no_check_time>, B<-partial_chain>, B<-policy>,
  423. B<-policy_check>, B<-policy_print>, B<-purpose>, B<-suiteB_128>,
  424. B<-suiteB_128_only>, B<-suiteB_192>, B<-trusted_first>, B<-use_deltas>,
  425. B<-auth_level>, B<-verify_depth>, B<-verify_email>, B<-verify_hostname>,
  426. B<-verify_ip>, B<-verify_name>, B<-x509_strict>
  427. Set different peer certificate verification options.
  428. See the L<verify(1)> manual page for details.
  429. =item B<-crl_check>, B<-crl_check_all>
  430. Check the peer certificate has not been revoked by its CA.
  431. The CRL(s) are appended to the certificate file. With the B<-crl_check_all>
  432. option all CRLs of all CAs in the chain are checked.
  433. =item B<-nbio>
  434. Turns on non blocking I/O.
  435. =item B<-psk_identity val>
  436. Expect the client to send PSK identity B<val> when using a PSK
  437. cipher suite, and warn if they do not. By default, the expected PSK
  438. identity is the string "Client_identity".
  439. =item B<-psk_hint val>
  440. Use the PSK identity hint B<val> when using a PSK cipher suite.
  441. =item B<-psk val>
  442. Use the PSK key B<val> when using a PSK cipher suite. The key is
  443. given as a hexadecimal number without leading 0x, for example -psk
  444. 1a2b3c4d.
  445. This option must be provided in order to use a PSK cipher.
  446. =item B<-listen>
  447. This option can only be used in conjunction with one of the DTLS options above.
  448. With this option B<s_server> will listen on a UDP port for incoming connections.
  449. Any ClientHellos that arrive will be checked to see if they have a cookie in
  450. them or not.
  451. Any without a cookie will be responded to with a HelloVerifyRequest.
  452. If a ClientHello with a cookie is received then B<s_server> will connect to
  453. that peer and complete the handshake.
  454. =item B<-dtls>, B<-dtls1>, B<-dtls1_2>
  455. These options make B<s_server> use DTLS protocols instead of TLS.
  456. With B<-dtls>, B<s_server> will negotiate any supported DTLS protocol version,
  457. whilst B<-dtls1> and B<-dtls1_2> will only support DTLSv1.0 and DTLSv1.2
  458. respectively.
  459. =item B<-sctp>
  460. Use SCTP for the transport protocol instead of UDP in DTLS. Must be used in
  461. conjunction with B<-dtls>, B<-dtls1> or B<-dtls1_2>. This option is only
  462. available where OpenSSL has support for SCTP enabled.
  463. =item B<-no_dhe>
  464. If this option is set then no DH parameters will be loaded effectively
  465. disabling the ephemeral DH cipher suites.
  466. =item B<-alpn val>, B<-nextprotoneg val>
  467. These flags enable the Enable the Application-Layer Protocol Negotiation
  468. or Next Protocol Negotiation (NPN) extension, respectively. ALPN is the
  469. IETF standard and replaces NPN.
  470. The B<val> list is a comma-separated list of supported protocol
  471. names. The list should contain the most desirable protocols first.
  472. Protocol names are printable ASCII strings, for example "http/1.1" or
  473. "spdy/3".
  474. The flag B<-nextprotoneg> cannot be specified if B<-tls1_3> is used.
  475. =item B<-engine val>
  476. Specifying an engine (by its unique id string in B<val>) will cause B<s_server>
  477. to attempt to obtain a functional reference to the specified engine,
  478. thus initialising it if needed. The engine will then be set as the default
  479. for all available algorithms.
  480. =item B<-keylogfile outfile>
  481. Appends TLS secrets to the specified keylog file such that external programs
  482. (like Wireshark) can decrypt TLS connections.
  483. =item B<-max_early_data int>
  484. Change the default maximum early data bytes that are specified for new sessions
  485. and any incoming early data (when used in conjunction with the B<-early_data>
  486. flag). The default value is approximately 16k. The argument must be an integer
  487. greater than or equal to 0.
  488. =item B<-early_data>
  489. Accept early data where possible.
  490. =back
  491. =head1 CONNECTED COMMANDS
  492. If a connection request is established with an SSL client and neither the
  493. B<-www> nor the B<-WWW> option has been used then normally any data received
  494. from the client is displayed and any key presses will be sent to the client.
  495. Certain single letter commands are also recognized which perform special
  496. operations: these are listed below.
  497. =over 4
  498. =item B<q>
  499. End the current SSL connection but still accept new connections.
  500. =item B<Q>
  501. End the current SSL connection and exit.
  502. =item B<r>
  503. Renegotiate the SSL session.
  504. =item B<R>
  505. Renegotiate the SSL session and request a client certificate.
  506. =item B<P>
  507. Send some plain text down the underlying TCP connection: this should
  508. cause the client to disconnect due to a protocol violation.
  509. =item B<S>
  510. Print out some session cache status information.
  511. =back
  512. =head1 NOTES
  513. B<s_server> can be used to debug SSL clients. To accept connections from
  514. a web browser the command:
  515. openssl s_server -accept 443 -www
  516. can be used for example.
  517. Although specifying an empty list of CAs when requesting a client certificate
  518. is strictly speaking a protocol violation, some SSL clients interpret this to
  519. mean any CA is acceptable. This is useful for debugging purposes.
  520. The session parameters can printed out using the B<sess_id> program.
  521. =head1 BUGS
  522. Because this program has a lot of options and also because some of the
  523. techniques used are rather old, the C source of B<s_server> is rather hard to
  524. read and not a model of how things should be done.
  525. A typical SSL server program would be much simpler.
  526. The output of common ciphers is wrong: it just gives the list of ciphers that
  527. OpenSSL recognizes and the client supports.
  528. There should be a way for the B<s_server> program to print out details of any
  529. unknown cipher suites a client says it supports.
  530. =head1 SEE ALSO
  531. L<SSL_CONF_cmd(3)>, L<sess_id(1)>, L<s_client(1)>, L<ciphers(1)>
  532. L<SSL_CTX_set_max_send_fragment(3)>, L<SSL_CTX_set_split_send_fragment(3)>
  533. L<SSL_CTX_set_max_pipelines(3)>
  534. =head1 HISTORY
  535. The -no_alt_chains option was first added to OpenSSL 1.1.0.
  536. The -allow-no-dhe-kex and -prioritize_chacha options were first added to
  537. OpenSSL 1.1.1.
  538. =head1 COPYRIGHT
  539. Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved.
  540. Licensed under the OpenSSL license (the "License"). You may not use
  541. this file except in compliance with the License. You can obtain a copy
  542. in the file LICENSE in the source distribution or at
  543. L<https://www.openssl.org/source/license.html>.
  544. =cut