summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjmc <>2004-04-06 13:47:34 +0000
committerjmc <>2004-04-06 13:47:34 +0000
commit17857517b8365550715ae6e3a903db79159baab7 (patch)
tree5b8922ac824e1c27aad89b6a14ae1ea9c85d3a4e /src
parent99251205c9dba09220b3b2086341141ec8f7f577 (diff)
downloadopenbsd-17857517b8365550715ae6e3a903db79159baab7.tar.gz
openbsd-17857517b8365550715ae6e3a903db79159baab7.tar.bz2
openbsd-17857517b8365550715ae6e3a903db79159baab7.zip
sort SYNOPSIS and options, and various other fixes,
for s_client and s_server;
Diffstat (limited to 'src')
-rw-r--r--src/usr.sbin/openssl/openssl.1530
1 files changed, 265 insertions, 265 deletions
diff --git a/src/usr.sbin/openssl/openssl.1 b/src/usr.sbin/openssl/openssl.1
index 0763306219..d6114b68e6 100644
--- a/src/usr.sbin/openssl/openssl.1
+++ b/src/usr.sbin/openssl/openssl.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: openssl.1,v 1.38 2004/04/01 10:34:13 djm Exp $ 1.\" $OpenBSD: openssl.1,v 1.39 2004/04/06 13:47:34 jmc Exp $
2.\" ==================================================================== 2.\" ====================================================================
3.\" Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. 3.\" Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
4.\" 4.\"
@@ -4303,7 +4303,7 @@ Multiple files can be specified separated by a
4303.Op Fl extensions Ar section 4303.Op Fl extensions Ar section
4304.Op Fl in Ar file 4304.Op Fl in Ar file
4305.Op Fl inform Ar DER | PEM 4305.Op Fl inform Ar DER | PEM
4306.Op Fl key Ar file 4306.Op Fl key Ar keyfile
4307.Op Fl keyform Ar DER | PEM 4307.Op Fl keyform Ar DER | PEM
4308.Op Fl keyout Ar file 4308.Op Fl keyout Ar file
4309.Op Fl nameopt Ar option 4309.Op Fl nameopt Ar option
@@ -4407,7 +4407,7 @@ The
4407form is the default format: 4407form is the default format:
4408it consists of the DER format base64-encoded with additional header and 4408it consists of the DER format base64-encoded with additional header and
4409footer lines. 4409footer lines.
4410.It Fl key Ar file 4410.It Fl key Ar keyfile
4411This specifies the file to read the private key from. 4411This specifies the file to read the private key from.
4412It also accepts PKCS#8 format private keys for PEM format files. 4412It also accepts PKCS#8 format private keys for PEM format files.
4413.It Fl keyform Ar DER | PEM 4413.It Fl keyform Ar DER | PEM
@@ -5381,40 +5381,40 @@ which it can be seen agrees with the recovered value above.
5381.Sh S_CLIENT 5381.Sh S_CLIENT
5382.Nm openssl s_client 5382.Nm openssl s_client
5383.Bk -words 5383.Bk -words
5384.Oo 5384.Op Fl 4 | 6
5385.Fl connect Ar host : Ns Ar port | 5385.Op Fl bugs
5386.Ar host Ns / Ns Ar port 5386.Op Fl crlf
5387.Oc
5388.Op Fl verify Ar depth
5389.Op Fl cert Ar file
5390.Op Fl key Ar file
5391.Op Fl CApath Ar directory
5392.Op Fl CAfile Ar file
5393.Op Fl reconnect
5394.Op Fl pause
5395.Op Fl showcerts
5396.Op Fl prexit
5397.Op Fl debug 5387.Op Fl debug
5388.Op Fl ign_eof
5398.Op Fl msg 5389.Op Fl msg
5399.Op Fl nbio_test
5400.Op Fl state
5401.Op Fl nbio 5390.Op Fl nbio
5402.Op Fl crlf 5391.Op Fl nbio_test
5403.Op Fl ign_eof
5404.Op Fl quiet
5405.Op Fl ssl2
5406.Op Fl ssl3
5407.Op Fl tls1
5408.Op Fl no_ssl2 5392.Op Fl no_ssl2
5409.Op Fl no_ssl3 5393.Op Fl no_ssl3
5410.Op Fl no_tls1 5394.Op Fl no_tls1
5411.Op Fl bugs 5395.Op Fl pause
5396.Op Fl prexit
5397.Op Fl quiet
5398.Op Fl reconnect
5412.Op Fl serverpref 5399.Op Fl serverpref
5400.Op Fl showcerts
5401.Op Fl ssl2
5402.Op Fl ssl3
5403.Op Fl state
5404.Op Fl tls1
5405.Op Fl CAfile Ar file
5406.Op Fl CApath Ar directory
5407.Op Fl cert Ar file
5413.Op Fl cipher Ar cipherlist 5408.Op Fl cipher Ar cipherlist
5414.Op Fl starttls Ar protocol 5409.Oo
5410.Fl connect Ar host : Ns Ar port |
5411.Ar host Ns / Ns Ar port
5412.Oc
5415.Op Fl engine Ar id 5413.Op Fl engine Ar id
5414.Op Fl key Ar keyfile
5416.Op Fl rand Ar file ... 5415.Op Fl rand Ar file ...
5417.Op Fl 4 | 6 5416.Op Fl starttls Ar protocol
5417.Op Fl verify Ar depth
5418.Ek 5418.Ek
5419.Pp 5419.Pp
5420The 5420The
@@ -5427,6 +5427,42 @@ useful diagnostic tool for SSL servers.
5427.Pp 5427.Pp
5428The options are as follows: 5428The options are as follows:
5429.Bl -tag -width "XXXX" 5429.Bl -tag -width "XXXX"
5430.It Fl 4
5431Specify that
5432.Nm s_client
5433should attempt connections using IPv4 only.
5434.It Fl 6
5435Specify that
5436.Nm s_client
5437should attempt connections using IPv6 only.
5438.It Fl bugs
5439There are several known bugs in SSL and TLS implementations.
5440Adding this option enables various workarounds.
5441.It Fl CAfile Ar file
5442A
5443.Ar file
5444containing trusted certificates to use during server authentication
5445and to use when attempting to build the client certificate chain.
5446.It Fl CApath Ar directory
5447The
5448.Ar directory
5449to use for server certificate verification.
5450This directory must be in
5451.Qq hash format ;
5452see
5453.Fl verify
5454for more information.
5455These are also used when building the client certificate chain.
5456.It Fl cert Ar file
5457The certificate to use, if one is requested by the server.
5458The default is not to use a certificate.
5459.It Fl cipher Ar cipherlist
5460This allows the cipher list sent by the client to be modified.
5461Although the server determines which cipher suite is used, it should take
5462the first supported cipher in the list sent by the client.
5463See the
5464.Sx CIPHERS
5465section above for more information.
5430.It Xo 5466.It Xo
5431.Fl connect Ar host : Ns Ar port | 5467.Fl connect Ar host : Ns Ar port |
5432.Ar host Ns / Ns Ar port 5468.Ar host Ns / Ns Ar port
@@ -5441,45 +5477,48 @@ on port 4433.
5441Alternatively, the host and port pair may be separated using a forward-slash 5477Alternatively, the host and port pair may be separated using a forward-slash
5442character. 5478character.
5443This form is useful for numeric IPv6 addresses. 5479This form is useful for numeric IPv6 addresses.
5444.It Fl cert Ar certname 5480.It Fl crlf
5445The certificate to use, if one is requested by the server. 5481This option translates a line feed from the terminal into CR+LF as required
5446The default is not to use a certificate. 5482by some servers.
5483.It Fl debug
5484Print extensive debugging information including a hex dump of all traffic.
5485.It Fl engine Ar id
5486Specifying an engine (by it's unique
5487.Ar id
5488string) will cause
5489.Nm s_client
5490to attempt to obtain a functional reference to the specified engine,
5491thus initialising it if needed.
5492The engine will then be set as the default for all available algorithms.
5493.It Fl ign_eof
5494Inhibit shutting down the connection when end of file is reached in the
5495input.
5447.It Fl key Ar keyfile 5496.It Fl key Ar keyfile
5448The private key to use. 5497The private key to use.
5449If not specified, then the certificate file will be used. 5498If not specified, then the certificate file will be used.
5450.It Fl verify Ar depth 5499.It Fl msg
5451The verify 5500Show all protocol messages with hex dump.
5452.Ar depth 5501.It Fl nbio
5453to use. 5502Turns on non-blocking I/O.
5454This specifies the maximum length of the 5503.It Fl nbio_test
5455server certificate chain and turns on server certificate verification. 5504Tests non-blocking I/O.
5456Currently the verify operation continues after errors so all the problems 5505.It Xo
5457with a certificate chain can be seen. 5506.Fl no_ssl2 | no_ssl3 | no_tls1 |
5458As a side effect the connection will never fail due to a server 5507.Fl ssl2 | ssl3 | tls1
5459certificate verify failure. 5508.Xc
5460.It Fl CApath Ar directory 5509These options disable the use of certain SSL or TLS protocols.
5461The 5510By default, the initial handshake uses a method which should be compatible
5462.Ar directory 5511with all servers and permit them to use SSL v3, SSL v2, or TLS as appropriate.
5463to use for server certificate verification. 5512.Pp
5464This directory must be in 5513Unfortunately there are a lot of ancient and broken servers in use which
5465.Qq hash format ; 5514cannot handle this technique and will fail to connect.
5466see 5515Some servers only work if TLS is turned off with the
5467.Fl verify 5516.Fl no_tls
5468for more information. 5517option, others will only support SSL v2 and may need the
5469These are also used when building the client certificate chain. 5518.Fl ssl2
5470.It Fl CAfile Ar file 5519option.
5471A
5472.Ar file
5473containing trusted certificates to use during server authentication
5474and to use when attempting to build the client certificate chain.
5475.It Fl reconnect
5476Reconnects to the same server 5 times using the same session ID; this can
5477be used as a test that session caching is working.
5478.It Fl pause 5520.It Fl pause
5479Pauses 1 second between each read and write call. 5521Pauses 1 second between each read and write call.
5480.It Fl showcerts
5481Display the whole server certificate chain: normally only the server
5482certificate itself is displayed.
5483.It Fl prexit 5522.It Fl prexit
5484Print session information when the program exits. 5523Print session information when the program exits.
5485This will always attempt 5524This will always attempt
@@ -5491,55 +5530,26 @@ requested only after an attempt is made to access a certain URL.
5491.Sy Note : 5530.Sy Note :
5492the output produced by this option is not always accurate because a 5531the output produced by this option is not always accurate because a
5493connection might never have been established. 5532connection might never have been established.
5494.It Fl state
5495Prints out the SSL session states.
5496.It Fl debug
5497Print extensive debugging information including a hex dump of all traffic.
5498.It Fl msg
5499Show all protocol messages with hex dump.
5500.It Fl nbio_test
5501Tests non-blocking I/O.
5502.It Fl nbio
5503Turns on non-blocking I/O.
5504.It Fl crlf
5505This option translates a line feed from the terminal into CR+LF as required
5506by some servers.
5507.It Fl ign_eof
5508Inhibit shutting down the connection when end of file is reached in the
5509input.
5510.It Fl quiet 5533.It Fl quiet
5511Inhibit printing of session and certificate information. 5534Inhibit printing of session and certificate information.
5512This implicitly turns on 5535This implicitly turns on
5513.Fl ign_eof 5536.Fl ign_eof
5514as well. 5537as well.
5515.It Xo 5538.It Fl rand Ar file ...
5516.Fl ssl2 | ssl3 | tls1 | 5539A file or files containing random data used to seed the random number generator,
5517.Fl no_ssl2 | no_ssl3 | no_tls1 5540or an EGD socket (see
5518.Xc 5541.Xr RAND_egd 3 ) .
5519These options disable the use of certain SSL or TLS protocols. 5542Multiple files can be specified separated by a
5520By default, the initial handshake uses a method which should be compatible 5543.Sq \&: .
5521with all servers and permit them to use SSL v3, SSL v2 or TLS as appropriate. 5544.It Fl reconnect
5522.Pp 5545Reconnects to the same server 5 times using the same session ID; this can
5523Unfortunately there are a lot of ancient and broken servers in use which 5546be used as a test that session caching is working.
5524cannot handle this technique and will fail to connect.
5525Some servers only work if TLS is turned off with the
5526.Fl no_tls
5527option, others will only support SSL v2 and may need the
5528.Fl ssl2
5529option.
5530.It Fl bugs
5531There are several known bugs in SSL and TLS implementations.
5532Adding this option enables various workarounds.
5533.It Fl serverpref 5547.It Fl serverpref
5534Use server's cipher preferences 5548Use server's cipher preferences
5535.Pq SSLv2 only . 5549.Pq SSLv2 only .
5536.It Fl cipher Ar cipherlist 5550.It Fl showcerts
5537This allows the cipher list sent by the client to be modified. 5551Display the whole server certificate chain: normally only the server
5538Although the server determines which cipher suite is used, it should take 5552certificate itself is displayed.
5539the first supported cipher in the list sent by the client.
5540See the
5541.Sx CIPHERS
5542section above for more information.
5543.It Fl starttls Ar protocol 5553.It Fl starttls Ar protocol
5544Send the protocol-specific message(s) to switch to TLS for communication. 5554Send the protocol-specific message(s) to switch to TLS for communication.
5545.Ar protocol 5555.Ar protocol
@@ -5548,28 +5558,18 @@ Currently, the only supported keywords are
5548.Qq smtp 5558.Qq smtp
5549and 5559and
5550.Qq pop3 . 5560.Qq pop3 .
5551.It Fl engine Ar id 5561.It Fl state
5552Specifying an engine (by it's unique 5562Prints out the SSL session states.
5553.Ar id 5563.It Fl verify Ar depth
5554string) will cause 5564The verify
5555.Nm s_client 5565.Ar depth
5556to attempt to obtain a functional reference to the specified engine, 5566to use.
5557thus initialising it if needed. 5567This specifies the maximum length of the
5558The engine will then be set as the default for all available algorithms. 5568server certificate chain and turns on server certificate verification.
5559.It Fl rand Ar file ... 5569Currently the verify operation continues after errors so all the problems
5560A file or files containing random data used to seed the random number generator, 5570with a certificate chain can be seen.
5561or an EGD socket (see 5571As a side effect the connection will never fail due to a server
5562.Xr RAND_egd 3 ) . 5572certificate verify failure.
5563Multiple files can be specified separated by a
5564.Sq \&: .
5565.It Fl 4
5566Specify that
5567.Nm s_client
5568should attempt connections using IPv4 only.
5569.It Fl 6
5570Specify that
5571.Nm s_client
5572should attempt connections using IPv6 only.
5573.El 5573.El
5574.Sh S_CLIENT CONNECTED COMMANDS 5574.Sh S_CLIENT CONNECTED COMMANDS
5575If a connection is established with an SSL server, then any data received 5575If a connection is established with an SSL server, then any data received
@@ -5600,7 +5600,7 @@ to retrieve a web page.
5600If the handshake fails, then there are several possible causes; if it is 5600If the handshake fails, then there are several possible causes; if it is
5601nothing obvious like no client certificate, then the 5601nothing obvious like no client certificate, then the
5602.Fl bugs , ssl2 , ssl3 , tls1 , 5602.Fl bugs , ssl2 , ssl3 , tls1 ,
5603.Fl no_ssl2 , no_ssl3 5603.Fl no_ssl2 , no_ssl3 ,
5604and 5604and
5605.Fl no_tls1 5605.Fl no_tls1
5606options can be tried in case it is a buggy server. 5606options can be tried in case it is a buggy server.
@@ -5657,43 +5657,43 @@ We should really report information whenever a session is renegotiated.
5657.Sh S_SERVER 5657.Sh S_SERVER
5658.Nm openssl s_server 5658.Nm openssl s_server
5659.Bk -words 5659.Bk -words
5660.Op Fl accept Ar port 5660.Op Fl bugs
5661.Op Fl context Ar id
5662.Op Fl verify Ar depth
5663.Op Fl Verify Ar depth
5664.Op Fl cert Ar file
5665.Op Fl key Ar keyfile
5666.Op Fl dcert Ar file
5667.Op Fl dkey Ar keyfile
5668.Op Fl dhparam Ar file
5669.Op Fl nbio
5670.Op Fl nbio_test
5671.Op Fl crlf 5661.Op Fl crlf
5672.Op Fl debug 5662.Op Fl debug
5663.Op Fl hack
5664.Op Fl HTTP
5673.Op Fl msg 5665.Op Fl msg
5674.Op Fl state 5666.Op Fl nbio
5675.Op Fl CApath Ar directory 5667.Op Fl nbio_test
5676.Op Fl CAfile Ar file 5668.Op Fl no_dhe
5669.Op Fl no_ssl2
5670.Op Fl no_ssl3
5671.Op Fl no_tls1
5672.Op Fl no_tmp_rsa
5677.Op Fl nocert 5673.Op Fl nocert
5678.Op Fl cipher Ar cipherlist
5679.Op Fl serverpref
5680.Op Fl quiet 5674.Op Fl quiet
5681.Op Fl no_tmp_rsa 5675.Op Fl serverpref
5682.Op Fl ssl2 5676.Op Fl ssl2
5683.Op Fl ssl3 5677.Op Fl ssl3
5678.Op Fl state
5684.Op Fl tls1 5679.Op Fl tls1
5685.Op Fl no_ssl2
5686.Op Fl no_ssl3
5687.Op Fl no_tls1
5688.Op Fl no_dhe
5689.Op Fl bugs
5690.Op Fl hack
5691.Op Fl www
5692.Op Fl WWW 5680.Op Fl WWW
5693.Op Fl HTTP 5681.Op Fl www
5682.Op Fl accept Ar port
5683.Op Fl CAfile Ar file
5684.Op Fl CApath Ar directory
5685.Op Fl cert Ar file
5686.Op Fl cipher Ar cipherlist
5687.Op Fl context Ar id
5688.Op Fl dcert Ar file
5689.Op Fl dhparam Ar file
5690.Op Fl dkey Ar file
5694.Op Fl engine Ar id 5691.Op Fl engine Ar id
5695.Op Fl id_prefix Ar arg 5692.Op Fl id_prefix Ar arg
5693.Op Fl key Ar keyfile
5696.Op Fl rand Ar file ... 5694.Op Fl rand Ar file ...
5695.Op Fl Verify Ar depth
5696.Op Fl verify Ar depth
5697.Ek 5697.Ek
5698.Pp 5698.Pp
5699The 5699The
@@ -5708,11 +5708,25 @@ The TCP
5708.Ar port 5708.Ar port
5709to listen on for connections. 5709to listen on for connections.
5710If not specified, 4433 is used. 5710If not specified, 4433 is used.
5711.It Fl context Ar id 5711.It Fl bugs
5712Sets the SSL context id. 5712There are several known bugs in SSL and TLS implementations.
5713It can be given any string value. 5713Adding this option enables various workarounds.
5714If this option is not present, a default value will be used. 5714.It Fl CAfile Ar file
5715.It Fl cert Ar certname 5715A file containing trusted certificates to use during client authentication
5716and to use when attempting to build the server certificate chain.
5717The list is also used in the list of acceptable client CAs passed to the
5718client when a certificate is requested.
5719.It Fl CApath Ar directory
5720The
5721.Ar directory
5722to use for client certificate verification.
5723This directory must be in
5724.Qq hash format ;
5725see
5726.Fl verify
5727for more information.
5728These are also used when building the server certificate chain.
5729.It Fl cert Ar file
5716The certificate to use; most server's cipher suites require the use of a 5730The certificate to use; most server's cipher suites require the use of a
5717certificate and some require a certificate with a certain public key type: 5731certificate and some require a certificate with a certain public key type:
5718for example the DSS cipher suites require a certificate containing a DSS 5732for example the DSS cipher suites require a certificate containing a DSS
@@ -5721,144 +5735,72 @@ key.
5721If not specified, then the file 5735If not specified, then the file
5722.Pa server.pem 5736.Pa server.pem
5723will be used. 5737will be used.
5724.It Fl key Ar keyfile 5738.It Fl cipher Ar cipherlist
5725The private key to use. 5739This allows the cipher list used by the server to be modified.
5726If not specified, then the certificate file will be used. 5740When the client sends a list of supported ciphers, the first client cipher
5727.It Fl dcert Ar file , Fl dkey Ar keyname 5741also included in the server list is used.
5742Because the client specifies the preference order, the order of the server
5743cipherlist is irrelevant.
5744See the
5745.Sx CIPHERS
5746section for more information.
5747.It Fl context Ar id
5748Sets the SSL context ID.
5749It can be given any string value.
5750If this option is not present, a default value will be used.
5751.It Fl crlf
5752This option translates a line feed from the terminal into CR+LF.
5753.It Fl dcert Ar file , Fl dkey Ar file
5728Specify an additional certificate and private key; these behave in the 5754Specify an additional certificate and private key; these behave in the
5729same manner as the 5755same manner as the
5730.Fl cert 5756.Fl cert
5731and 5757and
5732.Fl key 5758.Fl key
5733options except there is no default if they are not specified 5759options except there is no default if they are not specified
5734.Pq no additional certificate and key is used . 5760.Pq no additional certificate or key is used .
5735As noted above some cipher suites require a certificate containing a key of 5761As noted above some cipher suites require a certificate containing a key of
5736a certain type. 5762a certain type.
5737Some cipher suites need a certificate carrying an RSA key 5763Some cipher suites need a certificate carrying an RSA key
5738and some a DSS 5764and some a DSS
5739.Pq DSA 5765.Pq DSA
5740key. 5766key.
5741By using RSA and DSS certificates and keys 5767By using RSA and DSS certificates and keys,
5742a server can support clients which only support RSA or DSS cipher suites 5768a server can support clients which only support RSA or DSS cipher suites
5743by using an appropriate certificate. 5769by using an appropriate certificate.
5744.It Fl nocert 5770.It Fl debug
5745If this option is set, then no certificate is used. 5771Print extensive debugging information including a hex dump of all traffic.
5746This restricts the cipher suites available to the anonymous ones
5747.Pq currently just anonymous DH .
5748.It Fl dhparam Ar file 5772.It Fl dhparam Ar file
5749The DH parameter file to use. 5773The DH parameter file to use.
5750The ephemeral DH cipher suites generate keys 5774The ephemeral DH cipher suites generate keys
5751using a set of DH parameters. 5775using a set of DH parameters.
5752If not specified, then an attempt is made to 5776If not specified, then an attempt is made to
5753load the parameters from the server certificate file. 5777load the parameters from the server certificate file.
5754If this fails then a static set of parameters hard coded into the 5778If this fails, then a static set of parameters hard coded into the
5755.Nm s_server 5779.Nm s_server
5756program will be used. 5780program will be used.
5757.It Fl no_dhe 5781.It Fl engine Ar id
5758If this option is set, then no DH parameters will be loaded, effectively 5782Specifying an engine (by it's unique
5759disabling the ephemeral DH cipher suites. 5783.Ar id
5760.It Fl no_tmp_rsa 5784string) will cause
5761Certain export cipher suites sometimes use a temporary RSA key; this option 5785.Nm s_server
5762disables temporary RSA key generation. 5786to attempt to obtain a functional reference to the specified engine,
5763.It Fl verify Ar depth , Fl Verify Ar depth 5787thus initialising it if needed.
5764The verify 5788The engine will then be set as the default for all available algorithms.
5765.Ar depth
5766to use.
5767This specifies the maximum length of the client certificate chain
5768and makes the server request a certificate from the client.
5769With the
5770.Fl verify
5771option, a certificate is requested but the client does not have to send one.
5772With the
5773.Fl Verify
5774option, the client must supply a certificate or an error occurs.
5775.It Fl CApath Ar directory
5776The
5777.Ar directory
5778to use for client certificate verification.
5779This directory must be in
5780.Qq hash format ;
5781see
5782.Fl verify
5783for more information.
5784These are also used when building the server certificate chain.
5785.It Fl CAfile Ar file
5786A file containing trusted certificates to use during client authentication
5787and to use when attempting to build the server certificate chain.
5788The list is also used in the list of acceptable client CAs passed to the
5789client when a certificate is requested.
5790.It Fl state
5791Prints out the SSL session states.
5792.It Fl debug
5793Print extensive debugging information including a hex dump of all traffic.
5794.It Fl msg
5795Show all protocol messages with hex dump.
5796.It Fl nbio_test
5797Tests non-blocking I/O.
5798.It Fl nbio
5799Turns on non-blocking I/O.
5800.It Fl crlf
5801This option translates a line feed from the terminal into CR+LF.
5802.It Fl quiet
5803Inhibit printing of session and certificate information.
5804.It Xo
5805.Fl ssl2 | ssl3 | tls1 |
5806.Fl no_ssl2 | no_ssl3 | no_tls1
5807.Xc
5808These options disable the use of certain SSL or TLS protocols.
5809By default, the initial handshake uses a method which should be compatible
5810with all servers and permit them to use SSL v3, SSL v2 or TLS as appropriate.
5811.It Fl bugs
5812There are several known bugs in SSL and TLS implementations.
5813Adding this option enables various workarounds.
5814.It Fl hack 5789.It Fl hack
5815This option enables a further workaround for some early Netscape 5790This option enables a further workaround for some early Netscape
5816SSL code 5791SSL code
5817.Pq \&? . 5792.Pq \&? .
5818.It Fl cipher Ar cipherlist
5819This allows the cipher list used by the server to be modified.
5820When the client sends a list of supported ciphers, the first client cipher
5821also included in the server list is used.
5822Because the client specifies the preference order, the order of the server
5823cipherlist is irrelevant.
5824See the
5825.Sx CIPHERS
5826section for more information.
5827.It Fl serverpref
5828Use server's cipher preferences.
5829.It Fl www
5830Sends a status message back to the client when it connects.
5831This includes lots of information about the ciphers used and various
5832session parameters.
5833The output is in HTML format so this option will normally be used with a
5834web browser.
5835.It Fl WWW
5836Emulates a simple web server.
5837Pages will be resolved relative to the current directory;
5838for example if the URL
5839.Pa https://myhost/page.html
5840is requested, the file
5841.Pa ./page.html
5842will be loaded.
5843.It Fl HTTP 5793.It Fl HTTP
5844Emulates a simple web server. 5794Emulates a simple web server.
5845Pages will be resolved relative to the current directory; 5795Pages will be resolved relative to the current directory;
5846for example if the URL 5796for example if the URL
5847.Pa https://myhost/page.html 5797.Pa https://myhost/page.html
5848is requested the file 5798is requested, the file
5849.Pa ./page.html 5799.Pa ./page.html
5850will be loaded. 5800will be loaded.
5851The files loaded are assumed to contain a complete and correct HTTP 5801The files loaded are assumed to contain a complete and correct HTTP
5852response (lines that are part of the HTTP response line and headers 5802response (lines that are part of the HTTP response line and headers
5853must end with CRLF). 5803must end with CRLF).
5854.It Fl engine Ar id
5855Specifying an engine (by it's unique
5856.Ar id
5857string) will cause
5858.Nm s_server
5859to attempt to obtain a functional reference to the specified engine,
5860thus initialising it if needed.
5861The engine will then be set as the default for all available algorithms.
5862.It Fl id_prefix Ar arg 5804.It Fl id_prefix Ar arg
5863Generate SSL/TLS session IDs prefixed by 5805Generate SSL/TLS session IDs prefixed by
5864.Ar arg . 5806.Ar arg .
@@ -5867,12 +5809,70 @@ This is mostly useful for testing any SSL/TLS code
5867that wish to deal with multiple servers, when each of which might be 5809that wish to deal with multiple servers, when each of which might be
5868generating a unique range of session IDs 5810generating a unique range of session IDs
5869.Pq e.g. with a certain prefix . 5811.Pq e.g. with a certain prefix .
5812.It Fl key Ar keyfile
5813The private key to use.
5814If not specified, then the certificate file will be used.
5815.It Fl msg
5816Show all protocol messages with hex dump.
5817.It Fl nbio
5818Turns on non-blocking I/O.
5819.It Fl nbio_test
5820Tests non-blocking I/O.
5821.It Fl no_dhe
5822If this option is set, then no DH parameters will be loaded, effectively
5823disabling the ephemeral DH cipher suites.
5824.It Xo
5825.Fl no_ssl2 | no_ssl3 | no_tls1 |
5826.Fl ssl2 | ssl3 | tls1
5827.Xc
5828These options disable the use of certain SSL or TLS protocols.
5829By default, the initial handshake uses a method which should be compatible
5830with all servers and permit them to use SSL v3, SSL v2, or TLS as appropriate.
5831.It Fl no_tmp_rsa
5832Certain export cipher suites sometimes use a temporary RSA key; this option
5833disables temporary RSA key generation.
5834.It Fl nocert
5835If this option is set, then no certificate is used.
5836This restricts the cipher suites available to the anonymous ones
5837.Pq currently just anonymous DH .
5838.It Fl quiet
5839Inhibit printing of session and certificate information.
5870.It Fl rand Ar file ... 5840.It Fl rand Ar file ...
5871A file or files containing random data used to seed the random number generator, 5841A file or files containing random data used to seed the random number generator,
5872or an EGD socket (see 5842or an EGD socket (see
5873.Xr RAND_egd 3 ) . 5843.Xr RAND_egd 3 ) .
5874Multiple files can be specified separated by a 5844Multiple files can be specified separated by a
5875.Sq \&: . 5845.Sq \&: .
5846.It Fl serverpref
5847Use server's cipher preferences.
5848.It Fl state
5849Prints out the SSL session states.
5850.It Fl WWW
5851Emulates a simple web server.
5852Pages will be resolved relative to the current directory;
5853for example if the URL
5854.Pa https://myhost/page.html
5855is requested, the file
5856.Pa ./page.html
5857will be loaded.
5858.It Fl www
5859Sends a status message back to the client when it connects.
5860This includes lots of information about the ciphers used and various
5861session parameters.
5862The output is in HTML format so this option will normally be used with a
5863web browser.
5864.It Fl Verify Ar depth , Fl verify Ar depth
5865The verify
5866.Ar depth
5867to use.
5868This specifies the maximum length of the client certificate chain
5869and makes the server request a certificate from the client.
5870With the
5871.Fl Verify
5872option, the client must supply a certificate or an error occurs.
5873With the
5874.Fl verify
5875option, a certificate is requested but the client does not have to send one.
5876.El 5876.El
5877.Sh S_SERVER CONNECTED COMMANDS 5877.Sh S_SERVER CONNECTED COMMANDS
5878If a connection request is established with an SSL client and neither the 5878If a connection request is established with an SSL client and neither the
@@ -5885,17 +5885,17 @@ from the client is displayed and any key presses will be sent to the client.
5885Certain single letter commands are also recognized which perform special 5885Certain single letter commands are also recognized which perform special
5886operations: these are listed below. 5886operations: these are listed below.
5887.Bl -tag -width "XXXX" 5887.Bl -tag -width "XXXX"
5888.It Ar q 5888.It Ar P
5889End the current SSL connection, but still accept new connections. 5889Send some plain text down the underlying TCP connection: this should
5890cause the client to disconnect due to a protocol violation.
5890.It Ar Q 5891.It Ar Q
5891End the current SSL connection and exit. 5892End the current SSL connection and exit.
5892.It Ar r 5893.It Ar q
5893Renegotiate the SSL session. 5894End the current SSL connection, but still accept new connections.
5894.It Ar R 5895.It Ar R
5895Renegotiate the SSL session and request a client certificate. 5896Renegotiate the SSL session and request a client certificate.
5896.It Ar P 5897.It Ar r
5897Send some plain text down the underlying TCP connection: this should 5898Renegotiate the SSL session.
5898cause the client to disconnect due to a protocol violation.
5899.It Ar S 5899.It Ar S
5900Print out some session cache status information. 5900Print out some session cache status information.
5901.El 5901.El
@@ -5906,7 +5906,7 @@ To accept connections from a web browser the command:
5906.Pp 5906.Pp
5907.Dl $ openssl s_server -accept 443 -www 5907.Dl $ openssl s_server -accept 443 -www
5908.Pp 5908.Pp
5909can be used for example. 5909can be used, for example.
5910.Pp 5910.Pp
5911Most web browsers 5911Most web browsers
5912.Pq in particular Netscape and MSIE 5912.Pq in particular Netscape and MSIE