s_server
The s_server
command is a basic SSL-enabled server
that can be used as a diagnostic tool when building, setting up, and
debugging SSL clients.
Specify the port on which to listen for connections. If this option is not specified, the default of 4433 is used.
Specify any string that will be used as the SSL context ID.
Specify the name of a file containing the certificate to use. If this option is not specified, the command will look for a file called server.pem in the directory from which the command-line tool was started.
Specify the name of a file containing the private key to use. The private key must match the certificate that is being used. If this option is not specified, the command will expect to find the private key in the same file as the certificate.
Specify the name of a file containing an additional certificate that the server can use. This is useful for providing both RSA and DSA keys for connecting clients. There is no default if this option is not specified.
Specify the name of a file containing the private key that matches
the certificate specified with the dcert option.
If the dcert option is specified without this one,
the key should be in the same file as the certificate.
Cause no certificate to be used. Use of this option severely restricts the ciphers that are available for use. This means that only anonymous Diffie-Hellman ciphers may be used. Operating a server without a certificate provides very little actual security.
Specify the name of a file containing Diffie-Hellman parameters. The parameters will be used by the ephemeral DH ciphers to generate keys. If this option is not specified, the command will attempt to find Diffie-Hellman parameters in the same file as the server’s certificate.
Disable the use of the ephemeral DH ciphers. No Diffie-Hellman parameters will be searched for if this option is specified.
Disable the use of ciphers that require the use of temporary RSA keys.
Cause the server to request a certificate from the client and perform verification on it. The connection will be allowed to proceed if the client does not provide a certificate. The client’s certificate chain will not be allowed to be more than the specified depth.
Cause the server to demand a certificate from the client and perform verification on it. The connection will not be allowed to proceed if the client does not provide a certificate. The client’s certificate chain will not be allowed to be more than the specified depth.
Specify the name of a file containing trusted certificates that will be used to verify the client’s certificate if one is received when it’s requested.
Specify the name of a directory containing trusted certificates that will be used to verify the client’s certificate if one is received when it’s requested. Each file in the directory should contain only one certificate, and the files should be named with the certificate issuer name’s hash and an extension of “.0”.
Cause SSL session states to be printed.
Cause extensive debugging information, including a hexdump of all traffic, to be printed.
Cause tests of non-blocking I/O to be run.
Cause non-blocking I/O to be enabled.
Cause translation of bare linefeeds to be translated in carriage return and linefeed sequences, as is required by some servers.
Cause printing of session and certificate information to be suppressed.
Specify the version or versions of the SSL protocol that should be supported by the server. By default, all protocols are enabled.
Enable workarounds for several known bugs in various server implementations of SSL and TLS.
Enable an additional workaround required by some early versions of Netscape.
Specify a list of ciphers that the server will indicate to the client that it supports. Normally, the server chooses the cipher to use based on the order received from the client, so the ordering of the ciphers specified with this option is ignored.
Specify the name of a file or files that will be used to seed the PRNG. This option follows the guidelines outlined in Chapter 2.
Cause an HTML-formatted status message to be sent to the client when it connects.
Cause the server to emulate a simple HTTP server. Requested pages will be resolved relative to the directory from which the server was started.
When a connection is established with a client and neither the
www nor the WWW options are
specified, the server runs in interactive mode, displays all data
received from the client, and sends all data received from
stdin to the client. In addition, certain commands
are recognized as input from stdin, as enumerated
in Table A-2. The commands are recognized only
when they are entered at the start of a line.
|
Command |
Function performed by the server |
|
|
Terminates the current connection, but continues to accept new connections. |
|
|
Terminates the server. |
|
|
Renegotiates the SSL session. |
|
|
Renegotiates the SSL session and requests a client certificate. |
|
|
Sends plaintext to the underlying TCP connection, which is a protocol violation and should cause the client to disconnect. |
|
|