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