Accepting a TLS server connection on the command line
Follow these steps for accepting a TLS server connection on the command line:
- To accept a TLS server connection, we will use the
s_server
subcommand of theopenssl
tool. Its documentation can be found on itsman
page:$ man openssl-s_server
- We will provide a port number, a server certificate, and the corresponding server keypair to
openssl s_server
. That’s how we start a TLS server:$ openssl s_server \ -port 4433 \ -key server_keypair.pem \ -cert server_cert.pem
- To check that our TLS server can accept connections and send and receive data over them, we can start a TLS client in another terminal window and connect to our TLS server:
$ openssl s_client \ -connect localhost:4433 \ -verify_return_error \ -verify_hostname localhost \ -CAfile ca_cert...