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