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