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