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