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