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