OpenSSL β€’ Testing & Handshake

How to Test TLS Handshake, Protocols, and Cipher Suites with s_client

`openssl s_client` is the definitive CLI tool for testing TLS handshakes. It simulates a client connection, negotiates cipher suites, tests SNI routing, and reports handshake errors such as cipher mismatch or protocol deprecation.

Test TLS Handshake & Ciphers Command
Safe β€’ Read-Only / File Generation
openssl s_client -connect example.com:443 -servername example.com -tls1_3 -brief
Customize:
Domain:
Cert File:

OpenSSL Flags & Options Explained

-tls1_3Forces handshake to use TLS v1.3 only (or -tls1_2)
-briefPrints concise one-line summary of handshake result instead of verbose output
-cipher <list>Tests specific cipher suite string against the server

Execution Steps & Verification

1Test TLS 1.3 support with brief output

Check if the server supports TLS 1.3:

openssl s_client -connect example.com:443 -servername example.com -tls1_3 -brief </dev/null
2Test if legacy TLS 1.0/1.1 is properly disabled

Verify insecure protocols are rejected:

openssl s_client -connect example.com:443 -servername example.com -tls1 </dev/null
3Print complete certificate chain sent by server

Check for missing intermediate certificates causing SSL errors on mobile devices:

openssl s_client -connect example.com:443 -servername example.com -showcerts </dev/null

Common Security Pitfalls & Solutions

  • If mobile clients or curl report "certificate signed by unknown authority", check `-showcerts` output. Usually the server is missing intermediate CA certificates.

Prerequisites & Environment

  • Target domain reachable on TCP port 443.

Frequently Asked Questions About Test TLS Handshake & Ciphers

Frequently Asked Questions

Frequently Asked Questions

Everything you need to know regarding specifications, syntax, and security best practices.

It means the remote server's certificate chain was validated successfully against your local CA trust store.