You can use the s_client utility to debug an SSL/TLS server. Using the s_client utility, you can negotiate an SSL/TLS handshake under controlled conditions, accompanied by extensive logging and error reporting.
The options supported by the openssl s_client utility are as follows:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Before running the s_client utility, there must be an active SSL/TLS server to connect to. For example, you can have an s_server test server running on the local host, listening on port 9000. To run the s_client test client, open a command prompt and enter the following:
openssl s_client -connect localhost:9000 -ssl3 -cert clientcert.pem
Where clientcert.pem
is a file containing the client’s
X.509 certificate in PEM format. When you enter the command, you are prompted to
enter the pass phrase for the clientcert.pem
file.