927 lines
32 KiB
HTML
927 lines
32 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of S_SERVER</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>S_SERVER</H1>
|
|
Section: OpenSSL (1SSL)<BR>Updated: 2021-03-22<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
openssl-s_server, s_server - SSL/TLS server program
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
|
|
|
|
<B>openssl</B> <B>s_server</B>
|
|
[<B>-help</B>]
|
|
[<B>-port +int</B>]
|
|
[<B>-accept val</B>]
|
|
[<B>-unix val</B>]
|
|
[<B>-4</B>]
|
|
[<B>-6</B>]
|
|
[<B>-unlink</B>]
|
|
[<B>-context val</B>]
|
|
[<B>-verify int</B>]
|
|
[<B>-Verify int</B>]
|
|
[<B>-cert infile</B>]
|
|
[<B>-nameopt val</B>]
|
|
[<B>-naccept +int</B>]
|
|
[<B>-serverinfo val</B>]
|
|
[<B>-certform PEM|DER</B>]
|
|
[<B>-key infile</B>]
|
|
[<B>-keyform format</B>]
|
|
[<B>-pass val</B>]
|
|
[<B>-dcert infile</B>]
|
|
[<B>-dcertform PEM|DER</B>]
|
|
[<B>-dkey infile</B>]
|
|
[<B>-dkeyform PEM|DER</B>]
|
|
[<B>-dpass val</B>]
|
|
[<B>-nbio_test</B>]
|
|
[<B>-crlf</B>]
|
|
[<B>-debug</B>]
|
|
[<B>-msg</B>]
|
|
[<B>-msgfile outfile</B>]
|
|
[<B>-state</B>]
|
|
[<B>-CAfile infile</B>]
|
|
[<B>-CApath dir</B>]
|
|
[<B>-no-CAfile</B>]
|
|
[<B>-no-CApath</B>]
|
|
[<B>-nocert</B>]
|
|
[<B>-quiet</B>]
|
|
[<B>-no_resume_ephemeral</B>]
|
|
[<B>-www</B>]
|
|
[<B>-WWW</B>]
|
|
[<B>-servername</B>]
|
|
[<B>-servername_fatal</B>]
|
|
[<B>-cert2 infile</B>]
|
|
[<B>-key2 infile</B>]
|
|
[<B>-tlsextdebug</B>]
|
|
[<B>-HTTP</B>]
|
|
[<B>-id_prefix val</B>]
|
|
[<B>-rand file...</B>]
|
|
[<B>-writerand file</B>]
|
|
[<B>-keymatexport val</B>]
|
|
[<B>-keymatexportlen +int</B>]
|
|
[<B>-CRL infile</B>]
|
|
[<B>-crl_download</B>]
|
|
[<B>-cert_chain infile</B>]
|
|
[<B>-dcert_chain infile</B>]
|
|
[<B>-chainCApath dir</B>]
|
|
[<B>-verifyCApath dir</B>]
|
|
[<B>-no_cache</B>]
|
|
[<B>-ext_cache</B>]
|
|
[<B>-CRLform PEM|DER</B>]
|
|
[<B>-verify_return_error</B>]
|
|
[<B>-verify_quiet</B>]
|
|
[<B>-build_chain</B>]
|
|
[<B>-chainCAfile infile</B>]
|
|
[<B>-verifyCAfile infile</B>]
|
|
[<B>-ign_eof</B>]
|
|
[<B>-no_ign_eof</B>]
|
|
[<B>-status</B>]
|
|
[<B>-status_verbose</B>]
|
|
[<B>-status_timeout int</B>]
|
|
[<B>-status_url val</B>]
|
|
[<B>-status_file infile</B>]
|
|
[<B>-trace</B>]
|
|
[<B>-security_debug</B>]
|
|
[<B>-security_debug_verbose</B>]
|
|
[<B>-brief</B>]
|
|
[<B>-rev</B>]
|
|
[<B>-async</B>]
|
|
[<B>-ssl_config val</B>]
|
|
[<B>-max_send_frag +int</B>]
|
|
[<B>-split_send_frag +int</B>]
|
|
[<B>-max_pipelines +int</B>]
|
|
[<B>-read_buf +int</B>]
|
|
[<B>-no_ssl3</B>]
|
|
[<B>-no_tls1</B>]
|
|
[<B>-no_tls1_1</B>]
|
|
[<B>-no_tls1_2</B>]
|
|
[<B>-no_tls1_3</B>]
|
|
[<B>-bugs</B>]
|
|
[<B>-no_comp</B>]
|
|
[<B>-comp</B>]
|
|
[<B>-no_ticket</B>]
|
|
[<B>-num_tickets</B>]
|
|
[<B>-serverpref</B>]
|
|
[<B>-legacy_renegotiation</B>]
|
|
[<B>-no_renegotiation</B>]
|
|
[<B>-legacy_server_connect</B>]
|
|
[<B>-no_resumption_on_reneg</B>]
|
|
[<B>-no_legacy_server_connect</B>]
|
|
[<B>-allow_no_dhe_kex</B>]
|
|
[<B>-prioritize_chacha</B>]
|
|
[<B>-strict</B>]
|
|
[<B>-sigalgs val</B>]
|
|
[<B>-client_sigalgs val</B>]
|
|
[<B>-groups val</B>]
|
|
[<B>-curves val</B>]
|
|
[<B>-named_curve val</B>]
|
|
[<B>-cipher val</B>]
|
|
[<B>-ciphersuites val</B>]
|
|
[<B>-dhparam infile</B>]
|
|
[<B>-record_padding val</B>]
|
|
[<B>-debug_broken_protocol</B>]
|
|
[<B>-policy val</B>]
|
|
[<B>-purpose val</B>]
|
|
[<B>-verify_name val</B>]
|
|
[<B>-verify_depth int</B>]
|
|
[<B>-auth_level int</B>]
|
|
[<B>-attime intmax</B>]
|
|
[<B>-verify_hostname val</B>]
|
|
[<B>-verify_email val</B>]
|
|
[<B>-verify_ip</B>]
|
|
[<B>-ignore_critical</B>]
|
|
[<B>-issuer_checks</B>]
|
|
[<B>-crl_check</B>]
|
|
[<B>-crl_check_all</B>]
|
|
[<B>-policy_check</B>]
|
|
[<B>-explicit_policy</B>]
|
|
[<B>-inhibit_any</B>]
|
|
[<B>-inhibit_map</B>]
|
|
[<B>-x509_strict</B>]
|
|
[<B>-extended_crl</B>]
|
|
[<B>-use_deltas</B>]
|
|
[<B>-policy_print</B>]
|
|
[<B>-check_ss_sig</B>]
|
|
[<B>-trusted_first</B>]
|
|
[<B>-suiteB_128_only</B>]
|
|
[<B>-suiteB_128</B>]
|
|
[<B>-suiteB_192</B>]
|
|
[<B>-partial_chain</B>]
|
|
[<B>-no_alt_chains</B>]
|
|
[<B>-no_check_time</B>]
|
|
[<B>-allow_proxy_certs</B>]
|
|
[<B>-xkey</B>]
|
|
[<B>-xcert</B>]
|
|
[<B>-xchain</B>]
|
|
[<B>-xchain_build</B>]
|
|
[<B>-xcertform PEM|DER</B>]
|
|
[<B>-xkeyform PEM|DER</B>]
|
|
[<B>-nbio</B>]
|
|
[<B>-psk_identity val</B>]
|
|
[<B>-psk_hint val</B>]
|
|
[<B>-psk val</B>]
|
|
[<B>-psk_session file</B>]
|
|
[<B>-srpvfile infile</B>]
|
|
[<B>-srpuserseed val</B>]
|
|
[<B>-ssl3</B>]
|
|
[<B>-tls1</B>]
|
|
[<B>-tls1_1</B>]
|
|
[<B>-tls1_2</B>]
|
|
[<B>-tls1_3</B>]
|
|
[<B>-dtls</B>]
|
|
[<B>-timeout</B>]
|
|
[<B>-mtu +int</B>]
|
|
[<B>-listen</B>]
|
|
[<B>-dtls1</B>]
|
|
[<B>-dtls1_2</B>]
|
|
[<B>-sctp</B>]
|
|
[<B>-sctp_label_bug</B>]
|
|
[<B>-no_dhe</B>]
|
|
[<B>-nextprotoneg val</B>]
|
|
[<B>-use_srtp val</B>]
|
|
[<B>-alpn val</B>]
|
|
[<B>-engine val</B>]
|
|
[<B>-keylogfile outfile</B>]
|
|
[<B>-max_early_data int</B>]
|
|
[<B>-early_data</B>]
|
|
[<B>-anti_replay</B>]
|
|
[<B>-no_anti_replay</B>]
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
|
|
The <B>s_server</B> command implements a generic <FONT SIZE="-1">SSL/TLS</FONT> server which listens
|
|
for connections on a given port using <FONT SIZE="-1">SSL/TLS.</FONT>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
|
|
|
|
In addition to the options below the <B>s_server</B> utility also supports the
|
|
common and server only options documented
|
|
in the ``Supported Command Line Commands'' section of the <B><A HREF="/cgi-bin/man/man2html?3+SSL_CONF_cmd">SSL_CONF_cmd</A></B>(3)
|
|
manual page.
|
|
<DL COMPACT>
|
|
<DT id="1"><B>-help</B><DD>
|
|
|
|
|
|
Print out a usage message.
|
|
<DT id="2"><B>-port +int</B><DD>
|
|
|
|
|
|
The <FONT SIZE="-1">TCP</FONT> port to listen on for connections. If not specified 4433 is used.
|
|
<DT id="3"><B>-accept val</B><DD>
|
|
|
|
|
|
The optional <FONT SIZE="-1">TCP</FONT> host and port to listen on for connections. If not specified, *:4433 is used.
|
|
<DT id="4"><B>-unix val</B><DD>
|
|
|
|
|
|
Unix domain socket to accept on.
|
|
<DT id="5"><B>-4</B><DD>
|
|
|
|
|
|
Use IPv4 only.
|
|
<DT id="6"><B>-6</B><DD>
|
|
|
|
|
|
Use IPv6 only.
|
|
<DT id="7"><B>-unlink</B><DD>
|
|
|
|
|
|
For -unix, unlink any existing socket first.
|
|
<DT id="8"><B>-context val</B><DD>
|
|
|
|
|
|
Sets the <FONT SIZE="-1">SSL</FONT> context id. It can be given any string value. If this option
|
|
is not present a default value will be used.
|
|
<DT id="9"><B>-verify int</B>, <B>-Verify int</B><DD>
|
|
|
|
|
|
The verify depth to use. This specifies the maximum length of the
|
|
client certificate chain and makes the server request a certificate from
|
|
the client. With the <B>-verify</B> option a certificate is requested but the
|
|
client does not have to send one, with the <B>-Verify</B> option the client
|
|
must supply a certificate or an error occurs.
|
|
|
|
|
|
<P>
|
|
|
|
|
|
If the cipher suite cannot request a client certificate (for example an
|
|
anonymous cipher suite or <FONT SIZE="-1">PSK</FONT>) this option has no effect.
|
|
<DT id="10"><B>-cert infile</B><DD>
|
|
|
|
|
|
The certificate to use, most servers cipher suites require the use of a
|
|
certificate and some require a certificate with a certain public key type:
|
|
for example the <FONT SIZE="-1">DSS</FONT> cipher suites require a certificate containing a <FONT SIZE="-1">DSS</FONT>
|
|
(<FONT SIZE="-1">DSA</FONT>) key. If not specified then the filename ``server.pem'' will be used.
|
|
<DT id="11"><B>-cert_chain</B><DD>
|
|
|
|
|
|
A file containing trusted certificates to use when attempting to build the
|
|
client/server certificate chain related to the certificate specified via the
|
|
<B>-cert</B> option.
|
|
<DT id="12"><B>-build_chain</B><DD>
|
|
|
|
|
|
Specify whether the application should build the certificate chain to be
|
|
provided to the client.
|
|
<DT id="13"><B>-nameopt val</B><DD>
|
|
|
|
|
|
Option which determines how the subject or issuer names are displayed. The
|
|
<B>val</B> argument can be a single option or multiple options separated by
|
|
commas. Alternatively the <B>-nameopt</B> switch may be used more than once to
|
|
set multiple options. See the <B><A HREF="/cgi-bin/man/man2html?1+x509">x509</A></B>(1) manual page for details.
|
|
<DT id="14"><B>-naccept +int</B><DD>
|
|
|
|
|
|
The server will exit after receiving the specified number of connections,
|
|
default unlimited.
|
|
<DT id="15"><B>-serverinfo val</B><DD>
|
|
|
|
|
|
A file containing one or more blocks of <FONT SIZE="-1">PEM</FONT> data. Each <FONT SIZE="-1">PEM</FONT> block
|
|
must encode a <FONT SIZE="-1">TLS</FONT> ServerHello extension (2 bytes type, 2 bytes length,
|
|
followed by ``length'' bytes of extension data). If the client sends
|
|
an empty <FONT SIZE="-1">TLS</FONT> ClientHello extension matching the type, the corresponding
|
|
ServerHello extension will be returned.
|
|
<DT id="16"><B>-certform PEM|DER</B><DD>
|
|
|
|
|
|
The certificate format to use: <FONT SIZE="-1">DER</FONT> or <FONT SIZE="-1">PEM. PEM</FONT> is the default.
|
|
<DT id="17"><B>-key infile</B><DD>
|
|
|
|
|
|
The private key to use. If not specified then the certificate file will
|
|
be used.
|
|
<DT id="18"><B>-keyform format</B><DD>
|
|
|
|
|
|
The private format to use: <FONT SIZE="-1">DER</FONT> or <FONT SIZE="-1">PEM. PEM</FONT> is the default.
|
|
<DT id="19"><B>-pass val</B><DD>
|
|
|
|
|
|
The private key password source. For more information about the format of <B>val</B>
|
|
see the <B></B><FONT SIZE="-1"><B>PASS PHRASE ARGUMENTS</B></FONT><B></B> section in <B><A HREF="/cgi-bin/man/man2html?1+openssl">openssl</A></B>(1).
|
|
<DT id="20"><B>-dcert infile</B>, <B>-dkey infile</B><DD>
|
|
|
|
|
|
Specify an additional certificate and private key, these behave in the
|
|
same manner as the <B>-cert</B> and <B>-key</B> options except there is no default
|
|
if they are not specified (no additional certificate and key is used). As
|
|
noted above some cipher suites require a certificate containing a key of
|
|
a certain type. Some cipher suites need a certificate carrying an <FONT SIZE="-1">RSA</FONT> key
|
|
and some a <FONT SIZE="-1">DSS</FONT> (<FONT SIZE="-1">DSA</FONT>) key. By using <FONT SIZE="-1">RSA</FONT> and <FONT SIZE="-1">DSS</FONT> certificates and keys
|
|
a server can support clients which only support <FONT SIZE="-1">RSA</FONT> or <FONT SIZE="-1">DSS</FONT> cipher suites
|
|
by using an appropriate certificate.
|
|
<DT id="21"><B>-dcert_chain</B><DD>
|
|
|
|
|
|
A file containing trusted certificates to use when attempting to build the
|
|
server certificate chain when a certificate specified via the <B>-dcert</B> option
|
|
is in use.
|
|
<DT id="22"><B>-dcertform PEM|DER</B>, <B>-dkeyform PEM|DER</B>, <B>-dpass val</B><DD>
|
|
|
|
|
|
Additional certificate and private key format and passphrase respectively.
|
|
<DT id="23"><B>-xkey infile</B>, <B>-xcert infile</B>, <B>-xchain</B><DD>
|
|
|
|
|
|
Specify an extra certificate, private key and certificate chain. These behave
|
|
in the same manner as the <B>-cert</B>, <B>-key</B> and <B>-cert_chain</B> options. When
|
|
specified, the callback returning the first valid chain will be in use by
|
|
the server.
|
|
<DT id="24"><B>-xchain_build</B><DD>
|
|
|
|
|
|
Specify whether the application should build the certificate chain to be
|
|
provided to the client for the extra certificates provided via <B>-xkey infile</B>,
|
|
<B>-xcert infile</B>, <B>-xchain</B> options.
|
|
<DT id="25"><B>-xcertform PEM|DER</B>, <B>-xkeyform PEM|DER</B><DD>
|
|
|
|
|
|
Extra certificate and private key format respectively.
|
|
<DT id="26"><B>-nbio_test</B><DD>
|
|
|
|
|
|
Tests non blocking I/O.
|
|
<DT id="27"><B>-crlf</B><DD>
|
|
|
|
|
|
This option translated a line feed from the terminal into <FONT SIZE="-1">CR+LF.</FONT>
|
|
<DT id="28"><B>-debug</B><DD>
|
|
|
|
|
|
Print extensive debugging information including a hex dump of all traffic.
|
|
<DT id="29"><B>-msg</B><DD>
|
|
|
|
|
|
Show all protocol messages with hex dump.
|
|
<DT id="30"><B>-msgfile outfile</B><DD>
|
|
|
|
|
|
File to send output of <B>-msg</B> or <B>-trace</B> to, default standard output.
|
|
<DT id="31"><B>-state</B><DD>
|
|
|
|
|
|
Prints the <FONT SIZE="-1">SSL</FONT> session states.
|
|
<DT id="32"><B>-CAfile infile</B><DD>
|
|
|
|
|
|
A file containing trusted certificates to use during client authentication
|
|
and to use when attempting to build the server certificate chain. The list
|
|
is also used in the list of acceptable client CAs passed to the client when
|
|
a certificate is requested.
|
|
<DT id="33"><B>-CApath dir</B><DD>
|
|
|
|
|
|
The directory to use for client certificate verification. This directory
|
|
must be in ``hash format'', see <B><A HREF="/cgi-bin/man/man2html?1+verify">verify</A></B>(1) for more information. These are
|
|
also used when building the server certificate chain.
|
|
<DT id="34"><B>-chainCApath dir</B><DD>
|
|
|
|
|
|
The directory to use for building the chain provided to the client. This
|
|
directory must be in ``hash format'', see <B><A HREF="/cgi-bin/man/man2html?1+verify">verify</A></B>(1) for more information.
|
|
<DT id="35"><B>-chainCAfile file</B><DD>
|
|
|
|
|
|
A file containing trusted certificates to use when attempting to build the
|
|
server certificate chain.
|
|
<DT id="36"><B>-no-CAfile</B><DD>
|
|
|
|
|
|
Do not load the trusted <FONT SIZE="-1">CA</FONT> certificates from the default file location.
|
|
<DT id="37"><B>-no-CApath</B><DD>
|
|
|
|
|
|
Do not load the trusted <FONT SIZE="-1">CA</FONT> certificates from the default directory location.
|
|
<DT id="38"><B>-nocert</B><DD>
|
|
|
|
|
|
If this option is set then no certificate is used. This restricts the
|
|
cipher suites available to the anonymous ones (currently just anonymous
|
|
<FONT SIZE="-1">DH</FONT>).
|
|
<DT id="39"><B>-quiet</B><DD>
|
|
|
|
|
|
Inhibit printing of session and certificate information.
|
|
<DT id="40"><B>-www</B><DD>
|
|
|
|
|
|
Sends a status message back to the client when it connects. This includes
|
|
information about the ciphers used and various session parameters.
|
|
The output is in <FONT SIZE="-1">HTML</FONT> format so this option will normally be used with a
|
|
web browser. Cannot be used in conjunction with <B>-early_data</B>.
|
|
<DT id="41"><B>-WWW</B><DD>
|
|
|
|
|
|
Emulates a simple web server. Pages will be resolved relative to the
|
|
current directory, for example if the <FONT SIZE="-1">URL</FONT> <A HREF="https://myhost/page.html">https://myhost/page.html</A> is
|
|
requested the file ./page.html will be loaded. Cannot be used in conjunction
|
|
with <B>-early_data</B>.
|
|
<DT id="42"><B>-tlsextdebug</B><DD>
|
|
|
|
|
|
Print a hex dump of any <FONT SIZE="-1">TLS</FONT> extensions received from the server.
|
|
<DT id="43"><B>-HTTP</B><DD>
|
|
|
|
|
|
Emulates a simple web server. Pages will be resolved relative to the
|
|
current directory, for example if the <FONT SIZE="-1">URL</FONT> <A HREF="https://myhost/page.html">https://myhost/page.html</A> is
|
|
requested the file ./page.html will be loaded. The files loaded are
|
|
assumed to contain a complete and correct <FONT SIZE="-1">HTTP</FONT> response (lines that
|
|
are part of the <FONT SIZE="-1">HTTP</FONT> response line and headers must end with <FONT SIZE="-1">CRLF</FONT>). Cannot be
|
|
used in conjunction with <B>-early_data</B>.
|
|
<DT id="44"><B>-id_prefix val</B><DD>
|
|
|
|
|
|
Generate <FONT SIZE="-1">SSL/TLS</FONT> session IDs prefixed by <B>val</B>. This is mostly useful
|
|
for testing any <FONT SIZE="-1">SSL/TLS</FONT> code (eg. proxies) that wish to deal with multiple
|
|
servers, when each of which might be generating a unique range of session
|
|
IDs (eg. with a certain prefix).
|
|
<DT id="45"><B>-rand file...</B><DD>
|
|
|
|
|
|
A file or files containing random data used to seed the random number
|
|
generator.
|
|
Multiple files can be specified separated by an OS-dependent character.
|
|
The separator is <B>;</B> for MS-Windows, <B>,</B> for OpenVMS, and <B>:</B> for
|
|
all others.
|
|
<DT id="46">[<B>-writerand file</B>]<DD>
|
|
|
|
|
|
Writes random data to the specified <I>file</I> upon exit.
|
|
This can be used with a subsequent <B>-rand</B> flag.
|
|
<DT id="47"><B>-verify_return_error</B><DD>
|
|
|
|
|
|
Verification errors normally just print a message but allow the
|
|
connection to continue, for debugging purposes.
|
|
If this option is used, then verification errors close the connection.
|
|
<DT id="48"><B>-status</B><DD>
|
|
|
|
|
|
Enables certificate status request support (aka <FONT SIZE="-1">OCSP</FONT> stapling).
|
|
<DT id="49"><B>-status_verbose</B><DD>
|
|
|
|
|
|
Enables certificate status request support (aka <FONT SIZE="-1">OCSP</FONT> stapling) and gives
|
|
a verbose printout of the <FONT SIZE="-1">OCSP</FONT> response.
|
|
<DT id="50"><B>-status_timeout int</B><DD>
|
|
|
|
|
|
Sets the timeout for <FONT SIZE="-1">OCSP</FONT> response to <B>int</B> seconds.
|
|
<DT id="51"><B>-status_url val</B><DD>
|
|
|
|
|
|
Sets a fallback responder <FONT SIZE="-1">URL</FONT> to use if no responder <FONT SIZE="-1">URL</FONT> is present in the
|
|
server certificate. Without this option an error is returned if the server
|
|
certificate does not contain a responder address.
|
|
<DT id="52"><B>-status_file infile</B><DD>
|
|
|
|
|
|
Overrides any <FONT SIZE="-1">OCSP</FONT> responder URLs from the certificate and always provides the
|
|
<FONT SIZE="-1">OCSP</FONT> Response stored in the file. The file must be in <FONT SIZE="-1">DER</FONT> format.
|
|
<DT id="53"><B>-trace</B><DD>
|
|
|
|
|
|
Show verbose trace output of protocol messages. OpenSSL needs to be compiled
|
|
with <B>enable-ssl-trace</B> for this option to work.
|
|
<DT id="54"><B>-brief</B><DD>
|
|
|
|
|
|
Provide a brief summary of connection parameters instead of the normal verbose
|
|
output.
|
|
<DT id="55"><B>-rev</B><DD>
|
|
|
|
|
|
Simple test server which just reverses the text received from the client
|
|
and sends it back to the server. Also sets <B>-brief</B>. Cannot be used in
|
|
conjunction with <B>-early_data</B>.
|
|
<DT id="56"><B>-async</B><DD>
|
|
|
|
|
|
Switch on asynchronous mode. Cryptographic operations will be performed
|
|
asynchronously. This will only have an effect if an asynchronous capable engine
|
|
is also used via the <B>-engine</B> option. For test purposes the dummy async engine
|
|
(dasync) can be used (if available).
|
|
<DT id="57"><B>-max_send_frag +int</B><DD>
|
|
|
|
|
|
The maximum size of data fragment to send.
|
|
See <B><A HREF="/cgi-bin/man/man2html?3+SSL_CTX_set_max_send_fragment">SSL_CTX_set_max_send_fragment</A></B>(3) for further information.
|
|
<DT id="58"><B>-split_send_frag +int</B><DD>
|
|
|
|
|
|
The size used to split data for encrypt pipelines. If more data is written in
|
|
one go than this value then it will be split into multiple pipelines, up to the
|
|
maximum number of pipelines defined by max_pipelines. This only has an effect if
|
|
a suitable cipher suite has been negotiated, an engine that supports pipelining
|
|
has been loaded, and max_pipelines is greater than 1. See
|
|
<B><A HREF="/cgi-bin/man/man2html?3+SSL_CTX_set_split_send_fragment">SSL_CTX_set_split_send_fragment</A></B>(3) for further information.
|
|
<DT id="59"><B>-max_pipelines +int</B><DD>
|
|
|
|
|
|
The maximum number of encrypt/decrypt pipelines to be used. This will only have
|
|
an effect if an engine has been loaded that supports pipelining (e.g. the dasync
|
|
engine) and a suitable cipher suite has been negotiated. The default value is 1.
|
|
See <B><A HREF="/cgi-bin/man/man2html?3+SSL_CTX_set_max_pipelines">SSL_CTX_set_max_pipelines</A></B>(3) for further information.
|
|
<DT id="60"><B>-read_buf +int</B><DD>
|
|
|
|
|
|
The default read buffer size to be used for connections. This will only have an
|
|
effect if the buffer size is larger than the size that would otherwise be used
|
|
and pipelining is in use (see <B><A HREF="/cgi-bin/man/man2html?3+SSL_CTX_set_default_read_buffer_len">SSL_CTX_set_default_read_buffer_len</A></B>(3) for
|
|
further information).
|
|
<DT id="61"><B>-ssl2</B>, <B>-ssl3</B>, <B>-tls1</B>, <B>-tls1_1</B>, <B>-tls1_2</B>, <B>-tls1_3</B>, <B>-no_ssl2</B>, <B>-no_ssl3</B>, <B>-no_tls1</B>, <B>-no_tls1_1</B>, <B>-no_tls1_2</B>, <B>-no_tls1_3</B><DD>
|
|
|
|
|
|
These options require or disable the use of the specified <FONT SIZE="-1">SSL</FONT> or <FONT SIZE="-1">TLS</FONT> protocols.
|
|
By default <B>s_server</B> will negotiate the highest mutually supported protocol
|
|
version.
|
|
When a specific <FONT SIZE="-1">TLS</FONT> version is required, only that version will be accepted
|
|
from the client.
|
|
Note that not all protocols and flags may be available, depending on how
|
|
OpenSSL was built.
|
|
<DT id="62"><B>-bugs</B><DD>
|
|
|
|
|
|
There are several known bugs in <FONT SIZE="-1">SSL</FONT> and <FONT SIZE="-1">TLS</FONT> implementations. Adding this
|
|
option enables various workarounds.
|
|
<DT id="63"><B>-no_comp</B><DD>
|
|
|
|
|
|
Disable negotiation of <FONT SIZE="-1">TLS</FONT> compression.
|
|
<FONT SIZE="-1">TLS</FONT> compression is not recommended and is off by default as of
|
|
OpenSSL 1.1.0.
|
|
<DT id="64"><B>-comp</B><DD>
|
|
|
|
|
|
Enable negotiation of <FONT SIZE="-1">TLS</FONT> compression.
|
|
This option was introduced in OpenSSL 1.1.0.
|
|
<FONT SIZE="-1">TLS</FONT> compression is not recommended and is off by default as of
|
|
OpenSSL 1.1.0.
|
|
<DT id="65"><B>-no_ticket</B><DD>
|
|
|
|
|
|
Disable RFC4507bis session ticket support. This option has no effect if TLSv1.3
|
|
is negotiated. See <B>-num_tickets</B>.
|
|
<DT id="66"><B>-num_tickets</B><DD>
|
|
|
|
|
|
Control the number of tickets that will be sent to the client after a full
|
|
handshake in TLSv1.3. The default number of tickets is 2. This option does not
|
|
affect the number of tickets sent after a resumption handshake.
|
|
<DT id="67"><B>-serverpref</B><DD>
|
|
|
|
|
|
Use the server's cipher preferences, rather than the client's preferences.
|
|
<DT id="68"><B>-prioritize_chacha</B><DD>
|
|
|
|
|
|
Prioritize ChaCha ciphers when preferred by clients. Requires <B>-serverpref</B>.
|
|
<DT id="69"><B>-no_resumption_on_reneg</B><DD>
|
|
|
|
|
|
Set the <B></B><FONT SIZE="-1"><B>SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION</B></FONT><B></B> option.
|
|
<DT id="70"><B>-client_sigalgs val</B><DD>
|
|
|
|
|
|
Signature algorithms to support for client certificate authentication
|
|
(colon-separated list).
|
|
<DT id="71"><B>-named_curve val</B><DD>
|
|
|
|
|
|
Specifies the elliptic curve to use. <FONT SIZE="-1">NOTE:</FONT> this is single curve, not a list.
|
|
For a list of all possible curves, use:
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
|
|
<PRE>
|
|
$ openssl ecparam -list_curves
|
|
|
|
</PRE>
|
|
|
|
|
|
<DT id="72"><B>-cipher val</B><DD>
|
|
|
|
|
|
This allows the list of TLSv1.2 and below ciphersuites used by the server to be
|
|
modified. This list is combined with any TLSv1.3 ciphersuites that have been
|
|
configured. When the client sends a list of supported ciphers the first client
|
|
cipher also included in the server list is used. Because the client specifies
|
|
the preference order, the order of the server cipherlist is irrelevant. See
|
|
the <B>ciphers</B> command for more information.
|
|
<DT id="73"><B>-ciphersuites val</B><DD>
|
|
|
|
|
|
This allows the list of TLSv1.3 ciphersuites used by the server to be modified.
|
|
This list is combined with any TLSv1.2 and below ciphersuites that have been
|
|
configured. When the client sends a list of supported ciphers the first client
|
|
cipher also included in the server list is used. Because the client specifies
|
|
the preference order, the order of the server cipherlist is irrelevant. See
|
|
the <B>ciphers</B> command for more information. The format for this list is a
|
|
simple colon (``:'') separated list of TLSv1.3 ciphersuite names.
|
|
<DT id="74"><B>-dhparam infile</B><DD>
|
|
|
|
|
|
The <FONT SIZE="-1">DH</FONT> parameter file to use. The ephemeral <FONT SIZE="-1">DH</FONT> cipher suites generate keys
|
|
using a set of <FONT SIZE="-1">DH</FONT> parameters. If not specified then an attempt is made to
|
|
load the parameters from the server certificate file.
|
|
If this fails then a static set of parameters hard coded into the <B>s_server</B>
|
|
program will be used.
|
|
<DT id="75"><B>-attime</B>, <B>-check_ss_sig</B>, <B>-crl_check</B>, <B>-crl_check_all</B>, <B>-explicit_policy</B>, <B>-extended_crl</B>, <B>-ignore_critical</B>, <B>-inhibit_any</B>, <B>-inhibit_map</B>, <B>-no_alt_chains</B>, <B>-no_check_time</B>, <B>-partial_chain</B>, <B>-policy</B>, <B>-policy_check</B>, <B>-policy_print</B>, <B>-purpose</B>, <B>-suiteB_128</B>, <B>-suiteB_128_only</B>, <B>-suiteB_192</B>, <B>-trusted_first</B>, <B>-use_deltas</B>, <B>-auth_level</B>, <B>-verify_depth</B>, <B>-verify_email</B>, <B>-verify_hostname</B>, <B>-verify_ip</B>, <B>-verify_name</B>, <B>-x509_strict</B><DD>
|
|
|
|
|
|
Set different peer certificate verification options.
|
|
See the <B><A HREF="/cgi-bin/man/man2html?1+verify">verify</A></B>(1) manual page for details.
|
|
<DT id="76"><B>-crl_check</B>, <B>-crl_check_all</B><DD>
|
|
|
|
|
|
Check the peer certificate has not been revoked by its <FONT SIZE="-1">CA.</FONT>
|
|
The <FONT SIZE="-1">CRL</FONT>(s) are appended to the certificate file. With the <B>-crl_check_all</B>
|
|
option all CRLs of all CAs in the chain are checked.
|
|
<DT id="77"><B>-nbio</B><DD>
|
|
|
|
|
|
Turns on non blocking I/O.
|
|
<DT id="78"><B>-psk_identity val</B><DD>
|
|
|
|
|
|
Expect the client to send <FONT SIZE="-1">PSK</FONT> identity <B>val</B> when using a <FONT SIZE="-1">PSK</FONT>
|
|
cipher suite, and warn if they do not. By default, the expected <FONT SIZE="-1">PSK</FONT>
|
|
identity is the string ``Client_identity''.
|
|
<DT id="79"><B>-psk_hint val</B><DD>
|
|
|
|
|
|
Use the <FONT SIZE="-1">PSK</FONT> identity hint <B>val</B> when using a <FONT SIZE="-1">PSK</FONT> cipher suite.
|
|
<DT id="80"><B>-psk val</B><DD>
|
|
|
|
|
|
Use the <FONT SIZE="-1">PSK</FONT> key <B>val</B> when using a <FONT SIZE="-1">PSK</FONT> cipher suite. The key is
|
|
given as a hexadecimal number without leading 0x, for example -psk
|
|
1a2b3c4d.
|
|
This option must be provided in order to use a <FONT SIZE="-1">PSK</FONT> cipher.
|
|
<DT id="81"><B>-psk_session file</B><DD>
|
|
|
|
|
|
Use the pem encoded <FONT SIZE="-1">SSL_SESSION</FONT> data stored in <B>file</B> as the basis of a <FONT SIZE="-1">PSK.</FONT>
|
|
Note that this will only work if TLSv1.3 is negotiated.
|
|
<DT id="82"><B>-listen</B><DD>
|
|
|
|
|
|
This option can only be used in conjunction with one of the <FONT SIZE="-1">DTLS</FONT> options above.
|
|
With this option <B>s_server</B> will listen on a <FONT SIZE="-1">UDP</FONT> port for incoming connections.
|
|
Any ClientHellos that arrive will be checked to see if they have a cookie in
|
|
them or not.
|
|
Any without a cookie will be responded to with a HelloVerifyRequest.
|
|
If a ClientHello with a cookie is received then <B>s_server</B> will connect to
|
|
that peer and complete the handshake.
|
|
<DT id="83"><B>-dtls</B>, <B>-dtls1</B>, <B>-dtls1_2</B><DD>
|
|
|
|
|
|
These options make <B>s_server</B> use <FONT SIZE="-1">DTLS</FONT> protocols instead of <FONT SIZE="-1">TLS.</FONT>
|
|
With <B>-dtls</B>, <B>s_server</B> will negotiate any supported <FONT SIZE="-1">DTLS</FONT> protocol version,
|
|
whilst <B>-dtls1</B> and <B>-dtls1_2</B> will only support DTLSv1.0 and DTLSv1.2
|
|
respectively.
|
|
<DT id="84"><B>-sctp</B><DD>
|
|
|
|
|
|
Use <FONT SIZE="-1">SCTP</FONT> for the transport protocol instead of <FONT SIZE="-1">UDP</FONT> in <FONT SIZE="-1">DTLS.</FONT> Must be used in
|
|
conjunction with <B>-dtls</B>, <B>-dtls1</B> or <B>-dtls1_2</B>. This option is only
|
|
available where OpenSSL has support for <FONT SIZE="-1">SCTP</FONT> enabled.
|
|
<DT id="85"><B>-sctp_label_bug</B><DD>
|
|
|
|
|
|
Use the incorrect behaviour of older OpenSSL implementations when computing
|
|
endpoint-pair shared secrets for <FONT SIZE="-1">DTLS/SCTP.</FONT> This allows communication with
|
|
older broken implementations but breaks interoperability with correct
|
|
implementations. Must be used in conjunction with <B>-sctp</B>. This option is only
|
|
available where OpenSSL has support for <FONT SIZE="-1">SCTP</FONT> enabled.
|
|
<DT id="86"><B>-no_dhe</B><DD>
|
|
|
|
|
|
If this option is set then no <FONT SIZE="-1">DH</FONT> parameters will be loaded effectively
|
|
disabling the ephemeral <FONT SIZE="-1">DH</FONT> cipher suites.
|
|
<DT id="87"><B>-alpn val</B>, <B>-nextprotoneg val</B><DD>
|
|
|
|
|
|
These flags enable the Enable the Application-Layer Protocol Negotiation
|
|
or Next Protocol Negotiation (<FONT SIZE="-1">NPN</FONT>) extension, respectively. <FONT SIZE="-1">ALPN</FONT> is the
|
|
<FONT SIZE="-1">IETF</FONT> standard and replaces <FONT SIZE="-1">NPN.</FONT>
|
|
The <B>val</B> list is a comma-separated list of supported protocol
|
|
names. The list should contain the most desirable protocols first.
|
|
Protocol names are printable <FONT SIZE="-1">ASCII</FONT> strings, for example ``http/1.1'' or
|
|
``spdy/3''.
|
|
The flag <B>-nextprotoneg</B> cannot be specified if <B>-tls1_3</B> is used.
|
|
<DT id="88"><B>-engine val</B><DD>
|
|
|
|
|
|
Specifying an engine (by its unique id string in <B>val</B>) will cause <B>s_server</B>
|
|
to attempt to obtain a functional reference to the specified engine,
|
|
thus initialising it if needed. The engine will then be set as the default
|
|
for all available algorithms.
|
|
<DT id="89"><B>-keylogfile outfile</B><DD>
|
|
|
|
|
|
Appends <FONT SIZE="-1">TLS</FONT> secrets to the specified keylog file such that external programs
|
|
(like Wireshark) can decrypt <FONT SIZE="-1">TLS</FONT> connections.
|
|
<DT id="90"><B>-max_early_data int</B><DD>
|
|
|
|
|
|
Change the default maximum early data bytes that are specified for new sessions
|
|
and any incoming early data (when used in conjunction with the <B>-early_data</B>
|
|
flag). The default value is approximately 16k. The argument must be an integer
|
|
greater than or equal to 0.
|
|
<DT id="91"><B>-early_data</B><DD>
|
|
|
|
|
|
Accept early data where possible. Cannot be used in conjunction with <B>-www</B>,
|
|
<B>-WWW</B>, <B>-HTTP</B> or <B>-rev</B>.
|
|
<DT id="92"><B>-anti_replay</B>, <B>-no_anti_replay</B><DD>
|
|
|
|
|
|
Switches replay protection on or off, respectively. Replay protection is on by
|
|
default unless overridden by a configuration file. When it is on, OpenSSL will
|
|
automatically detect if a session ticket has been used more than once, TLSv1.3
|
|
has been negotiated, and early data is enabled on the server. A full handshake
|
|
is forced if a session ticket is used a second or subsequent time. Any early
|
|
data that was sent will be rejected.
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>CONNECTED COMMANDS</H2>
|
|
|
|
|
|
|
|
If a connection request is established with an <FONT SIZE="-1">SSL</FONT> client and neither the
|
|
<B>-www</B> nor the <B>-WWW</B> option has been used then normally any data received
|
|
from the client is displayed and any key presses will be sent to the client.
|
|
<P>
|
|
|
|
Certain commands are also recognized which perform special operations. These
|
|
commands are a letter which must appear at the start of a line. They are listed
|
|
below.
|
|
<DL COMPACT>
|
|
<DT id="93"><B>q</B><DD>
|
|
|
|
|
|
End the current <FONT SIZE="-1">SSL</FONT> connection but still accept new connections.
|
|
<DT id="94"><B>Q</B><DD>
|
|
|
|
|
|
End the current <FONT SIZE="-1">SSL</FONT> connection and exit.
|
|
<DT id="95"><B>r</B><DD>
|
|
|
|
|
|
Renegotiate the <FONT SIZE="-1">SSL</FONT> session (TLSv1.2 and below only).
|
|
<DT id="96"><B>R</B><DD>
|
|
|
|
|
|
Renegotiate the <FONT SIZE="-1">SSL</FONT> session and request a client certificate (TLSv1.2 and below
|
|
only).
|
|
<DT id="97"><B>P</B><DD>
|
|
|
|
|
|
Send some plain text down the underlying <FONT SIZE="-1">TCP</FONT> connection: this should
|
|
cause the client to disconnect due to a protocol violation.
|
|
<DT id="98"><B>S</B><DD>
|
|
|
|
|
|
Print out some session cache status information.
|
|
<DT id="99"><B>B</B><DD>
|
|
|
|
|
|
Send a heartbeat message to the client (<FONT SIZE="-1">DTLS</FONT> only)
|
|
<DT id="100"><B>k</B><DD>
|
|
|
|
|
|
Send a key update message to the client (TLSv1.3 only)
|
|
<DT id="101"><B>K</B><DD>
|
|
|
|
|
|
Send a key update message to the client and request one back (TLSv1.3 only)
|
|
<DT id="102"><B>c</B><DD>
|
|
|
|
|
|
Send a certificate request to the client (TLSv1.3 only)
|
|
</DL>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>NOTES</H2>
|
|
|
|
|
|
|
|
<B>s_server</B> can be used to debug <FONT SIZE="-1">SSL</FONT> clients. To accept connections from
|
|
a web browser the command:
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
openssl s_server -accept 443 -www
|
|
|
|
</PRE>
|
|
|
|
|
|
<P>
|
|
|
|
can be used for example.
|
|
<P>
|
|
|
|
Although specifying an empty list of CAs when requesting a client certificate
|
|
is strictly speaking a protocol violation, some <FONT SIZE="-1">SSL</FONT> clients interpret this to
|
|
mean any <FONT SIZE="-1">CA</FONT> is acceptable. This is useful for debugging purposes.
|
|
<P>
|
|
|
|
The session parameters can printed out using the <B>sess_id</B> program.
|
|
<A NAME="lbAH"> </A>
|
|
<H2>BUGS</H2>
|
|
|
|
|
|
|
|
Because this program has a lot of options and also because some of the
|
|
techniques used are rather old, the C source of <B>s_server</B> is rather hard to
|
|
read and not a model of how things should be done.
|
|
A typical <FONT SIZE="-1">SSL</FONT> server program would be much simpler.
|
|
<P>
|
|
|
|
The output of common ciphers is wrong: it just gives the list of ciphers that
|
|
OpenSSL recognizes and the client supports.
|
|
<P>
|
|
|
|
There should be a way for the <B>s_server</B> program to print out details of any
|
|
unknown cipher suites a client says it supports.
|
|
<A NAME="lbAI"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?3+SSL_CONF_cmd">SSL_CONF_cmd</A></B>(3), <B><A HREF="/cgi-bin/man/man2html?1+sess_id">sess_id</A></B>(1), <B><A HREF="/cgi-bin/man/man2html?1+s_client">s_client</A></B>(1), <B><A HREF="/cgi-bin/man/man2html?1+ciphers">ciphers</A></B>(1)
|
|
<B><A HREF="/cgi-bin/man/man2html?3+SSL_CTX_set_max_send_fragment">SSL_CTX_set_max_send_fragment</A></B>(3),
|
|
<B><A HREF="/cgi-bin/man/man2html?3+SSL_CTX_set_split_send_fragment">SSL_CTX_set_split_send_fragment</A></B>(3),
|
|
<B><A HREF="/cgi-bin/man/man2html?3+SSL_CTX_set_max_pipelines">SSL_CTX_set_max_pipelines</A></B>(3)
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>HISTORY</H2>
|
|
|
|
|
|
|
|
The -no_alt_chains option was added in OpenSSL 1.1.0.
|
|
<P>
|
|
|
|
The
|
|
-allow-no-dhe-kex and -prioritize_chacha options were added in OpenSSL 1.1.1.
|
|
<A NAME="lbAK"> </A>
|
|
<H2>COPYRIGHT</H2>
|
|
|
|
|
|
|
|
Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.
|
|
<P>
|
|
|
|
Licensed under the OpenSSL license (the ``License''). You may not use
|
|
this file except in compliance with the License. You can obtain a copy
|
|
in the file <FONT SIZE="-1">LICENSE</FONT> in the source distribution or at
|
|
<<A HREF="https://www.openssl.org/source/license.html">https://www.openssl.org/source/license.html</A>>.
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="103"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="104"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="105"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="106"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="107"><A HREF="#lbAF">CONNECTED COMMANDS</A><DD>
|
|
<DT id="108"><A HREF="#lbAG">NOTES</A><DD>
|
|
<DT id="109"><A HREF="#lbAH">BUGS</A><DD>
|
|
<DT id="110"><A HREF="#lbAI">SEE ALSO</A><DD>
|
|
<DT id="111"><A HREF="#lbAJ">HISTORY</A><DD>
|
|
<DT id="112"><A HREF="#lbAK">COPYRIGHT</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:27 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|