Automatically generated by Pod::Man 2.25 (Pod::Simple 3.23) Standard preamble: ========================================================================..
..
..
Set up some character translations and predefined strings. \*(-- will give an unbreakable dash, \*(PI will give pi, \*(L" will give a left double quote, and \*(R" will give a right double quote. \*(C+ will give a nicer C++. Capital omega is used to do unbreakable dashes and therefore won't be available. \*(C` and \*(C' expand to `' in nroff, nothing in troff, for use with C<>..tr \(*W-
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
'br\}
Escape single quotes in literal strings from groff's Unicode transform. If the F register is turned on, we'll generate index entries on stderr for titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index entries marked with X<> in POD. Of course, you'll have to process the output yourself in some meaningful fashion.. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. nr % 0
. rr F
.\}
. de IX
..
.\}
Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). Fear. Run. Save yourself. No user-serviceable parts.. \" fudge factors for nroff and troff
. ds #H 0
. ds #V .8m
. ds #F .3m
. ds #[ \f1
. ds #]
.\}
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
. ds #V .6m
. ds #F 0
. ds #[ \&
. ds #] \&
.\}
. \" simple accents for nroff and troff
. ds ' \&
. ds ` \&
. ds ^ \&
. ds , \&
. ds ~ ~
. ds /
.\}
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
. \" troff and (daisy-wheel) nroff accents
. \" corrections for vroff
. \" for low resolution devices (crt and lpr)
\{\
. ds : e
. ds 8 ss
. ds o a
. ds d- d\h'-1'\(ga
. ds D- D\h'-1'\(hy
. ds th \o'bp'
. ds Th \o'LP'
. ds ae ae
. ds Ae AE
.\}
======================================================================== Title "S_SERVER 1" S_SERVER 1 "2013-02-11" "1.0.1e" "OpenSSL"
For nroff, turn off justification. Always turn off hyphenation; it makes way too many mistakes in technical documents. "NAME"
s_server -
SSL/
TLS server program
"SYNOPSIS"
Header "SYNOPSIS" \fBopenssl
s_server
[
-accept port]
[
-context id]
[
-verify depth]
[
-Verify depth]
[
-crl_check]
[
-crl_check_all]
[
-cert filename]
[
-certform DER|PEM]
[
-key keyfile]
[
-keyform DER|PEM]
[
-pass arg]
[
-dcert filename]
[
-dcertform DER|PEM]
[
-dkey keyfile]
[
-dkeyform DER|PEM]
[
-dpass arg]
[
-dhparam filename]
[
-nbio]
[
-nbio_test]
[
-crlf]
[
-debug]
[
-msg]
[
-state]
[
-CApath directory]
[
-CAfile filename]
[
-nocert]
[
-cipher cipherlist]
[
-quiet]
[
-no_tmp_rsa]
[
-ssl2]
[
-ssl3]
[
-tls1]
[
-no_ssl2]
[
-no_ssl3]
[
-no_tls1]
[
-no_dhe]
[
-bugs]
[
-hack]
[
-www]
[
-WWW]
[
-HTTP]
[
-engine id]
[
-tlsextdebug]
[
-no_ticket]
[
-id_prefix arg]
[
-rand file(s)]
"DESCRIPTION"
Header "DESCRIPTION" The
s_server command implements a generic \
s-1SSL/
TLS\s0 server which listens
for connections on a given port using \
s-1SSL/
TLS\s0.
"OPTIONS"
Header "OPTIONS" "-accept port" 4
Item "-accept port" the \s-1TCP\s0 port to listen on for connections. If not specified 4433 is used.
"-context id" 4
Item "-context id" sets the \s-1SSL\s0 context id. It can be given any string value. If this option
is not present a default value will be used.
"-cert certname" 4
Item "-cert certname" 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 \s-1DSS\s0 cipher suites require a certificate containing a \s-1DSS\s0
(\s-1DSA\s0) key. If not specified then the filename \*(L"server.pem\*(R" will be used.
"-certform format" 4
Item "-certform format" The certificate format to use: \s-1DER\s0 or \s-1PEM\s0. \s-1PEM\s0 is the default.
"-key keyfile" 4
Item "-key keyfile" The private key to use. If not specified then the certificate file will
be used.
"-keyform format" 4
Item "-keyform format" The private format to use: \s-1DER\s0 or \s-1PEM\s0. \s-1PEM\s0 is the default.
"-pass arg" 4
Item "-pass arg" the private key password source. For more information about the format of
arg
see the
\s-1PASS\s0 \s-1PHRASE\s0 \s-1ARGUMENTS\s0 section in
openssl\|(1).
"-dcert filename, -dkey keyname" 4
Item "-dcert filename, -dkey keyname" specify an additional certificate and private key, these behave in the
same manner as the
-cert and
-key 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 \s-1RSA\s0 key
and some a \s-1DSS\s0 (\s-1DSA\s0) key. By using \s-1RSA\s0 and \s-1DSS\s0 certificates and keys
a server can support clients which only support \s-1RSA\s0 or \s-1DSS\s0 cipher suites
by using an appropriate certificate.
"-dcertform format, -dkeyform format, -dpass arg" 4
Item "-dcertform format, -dkeyform format, -dpass arg" addtional certificate and private key format and passphrase respectively.
"-nocert" 4
Item "-nocert" if this option is set then no certificate is used. This restricts the
cipher suites available to the anonymous ones (currently just anonymous
\s-1DH\s0).
"-dhparam filename" 4
Item "-dhparam filename" the \s-1DH\s0 parameter file to use. The ephemeral \s-1DH\s0 cipher suites generate keys
using a set of \s-1DH\s0 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 s_server program will be used.
"-no_dhe" 4
Item "-no_dhe" if this option is set then no \s-1DH\s0 parameters will be loaded effectively
disabling the ephemeral \s-1DH\s0 cipher suites.
"-no_tmp_rsa" 4
Item "-no_tmp_rsa" certain export cipher suites sometimes use a temporary \s-1RSA\s0 key, this option
disables temporary \s-1RSA\s0 key generation.
"-verify depth, -Verify depth" 4
Item "-verify depth, -Verify depth" 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
-verify option a certificate is requested but the
client does not have to send one, with the
-Verify option the client
must supply a certificate or an error occurs.
"-crl_check, -crl_check_all" 4
Item "-crl_check, -crl_check_all" Check the peer certificate has not been revoked by its \s-1CA\s0.
The \s-1CRL\s0(s) are appended to the certificate file. With the
-crl_check_all
option all CRLs of all CAs in the chain are checked.
"-CApath directory" 4
Item "-CApath directory" The directory to use for client certificate verification. This directory
must be in \*(L"hash format\*(R", see
verify for more information. These are
also used when building the server certificate chain.
"-CAfile file" 4
Item "-CAfile file" 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.
"-state" 4
Item "-state" prints out the \s-1SSL\s0 session states.
"-debug" 4
Item "-debug" print extensive debugging information including a hex dump of all traffic.
"-msg" 4
Item "-msg" show all protocol messages with hex dump.
"-nbio_test" 4
Item "-nbio_test" tests non blocking I/O
"-nbio" 4
Item "-nbio" turns on non blocking I/O
"-crlf" 4
Item "-crlf" this option translated a line feed from the terminal into \s-1CR+LF\s0.
"-quiet" 4
Item "-quiet" inhibit printing of session and certificate information.
"-psk_hint hint" 4
Item "-psk_hint hint" Use the \s-1PSK\s0 identity hint
hint when using a \s-1PSK\s0 cipher suite.
"-psk key" 4
Item "-psk key" Use the \s-1PSK\s0 key
key when using a \s-1PSK\s0 cipher suite. The key is
given as a hexadecimal number without leading 0x, for example -psk
1a2b3c4d.
"-ssl2, -ssl3, -tls1, -no_ssl2, -no_ssl3, -no_tls1" 4
Item "-ssl2, -ssl3, -tls1, -no_ssl2, -no_ssl3, -no_tls1" these options disable the use of certain \s-1SSL\s0 or \s-1TLS\s0 protocols. By default
the initial handshake uses a method which should be compatible with all
servers and permit them to use \s-1SSL\s0 v3, \s-1SSL\s0 v2 or \s-1TLS\s0 as appropriate.
"-bugs" 4
Item "-bugs" there are several known bug in \s-1SSL\s0 and \s-1TLS\s0 implementations. Adding this
option enables various workarounds.
"-hack" 4
Item "-hack" this option enables a further workaround for some some early Netscape
\s-1SSL\s0 code (?).
"-cipher cipherlist" 4
Item "-cipher cipherlist" this allows the cipher list used by the server to be modified. 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 irrelevant. See
the
ciphers command for more information.
"-tlsextdebug" 4
Item "-tlsextdebug" print out a hex dump of any \s-1TLS\s0 extensions received from the server.
"-no_ticket" 4
Item "-no_ticket" disable RFC4507bis session ticket support.
"-www" 4
Item "-www" sends a status message back to the client when it connects. This includes
lots of information about the ciphers used and various session parameters.
The output is in \s-1HTML\s0 format so this option will normally be used with a
web browser.
"-WWW" 4
Item "-WWW" emulates a simple web server. Pages will be resolved relative to the
current directory, for example if the \s-1URL\s0 https://
myhost/
page.html is
requested the file ./
page.html will be loaded.
"-HTTP" 4
Item "-HTTP" emulates a simple web server. Pages will be resolved relative to the
current directory, for example if the \s-1URL\s0 https://
myhost/
page.html is
requested the file ./
page.html will be loaded. The files loaded are
assumed to contain a complete and correct \s-1HTTP\s0 response (lines that
are part of the \s-1HTTP\s0 response line and headers must end with \s-1CRLF\s0).
"-engine id" 4
Item "-engine id" specifying an engine (by its unique
id string) will cause
s_server
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.
"-id_prefix arg" 4
Item "-id_prefix arg" generate \
s-1SSL/
TLS\s0 session IDs prefixed by
arg. This is mostly useful
for testing any \
s-1SSL/
TLS\s0 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).
"-rand file(s)" 4
Item "-rand file(s)" a file or files containing random data used to seed the random number
generator, or an \s-1EGD\s0 socket (see
RAND_egd\|(3)).
Multiple files can be specified separated by a OS-dependent character.
The separator is
; for MS-Windows,
, for OpenVMS, and
: for
all others.
"CONNECTED COMMANDS"
Header "CONNECTED COMMANDS" If a connection request is established with an \s-1SSL\s0 client and neither the
\fB-www nor the
-WWW option has been used then normally any data received
from the client is displayed and any key presses will be sent to the client.
Certain single letter commands are also recognized which perform special
operations: these are listed below.
"q" 4
Item "q" end the current \s-1SSL\s0 connection but still accept new connections.
"Q" 4
Item "Q" end the current \s-1SSL\s0 connection and exit.
"r" 4
Item "r" renegotiate the \s-1SSL\s0 session.
"R" 4
Item "R" renegotiate the \s-1SSL\s0 session and request a client certificate.
"P" 4
Item "P" send some plain text down the underlying \s-1TCP\s0 connection: this should
cause the client to disconnect due to a protocol violation.
"S" 4
Item "S" print out some session cache status information.
"NOTES"
Header "NOTES" \fBs_server can be used to debug \s-1SSL\s0 clients. To accept connections from
a web browser the command:
.Vb 1
openssl s_server -accept 443 -www
.Ve
can be used for example.
Most web browsers (in particular Netscape and \s-1MSIE\s0) only support \s-1RSA\s0 cipher
suites, so they cannot connect to servers which don't use a certificate
carrying an \s-1RSA\s0 key or a version of OpenSSL with \s-1RSA\s0 disabled.
Although specifying an empty list of CAs when requesting a client certificate
is strictly speaking a protocol violation, some \s-1SSL\s0 clients interpret this to
mean any \s-1CA\s0 is acceptable. This is useful for debugging purposes.
The session parameters can printed out using the sess_id program.
"BUGS"
Header "BUGS" Because this program has a lot of options and also because some of
the techniques used are rather old, the C source of s_server is rather
hard to read and not a model of how things should be done. A typical
\s-1SSL\s0 server program would be much simpler.
The output of common ciphers is wrong: it just gives the list of ciphers that
OpenSSL recognizes and the client supports.
There should be a way for the s_server program to print out details of any
unknown cipher suites a client says it supports.
"SEE ALSO"
Header "SEE ALSO" \fIsess_id\|(1),
s_client\|(1),
ciphers\|(1)