Reading a TLS handshake without Wireshark

Three checks answer most "is the certificate wrong or is the network wrong" questions, and none of them need a packet capture.

openssl s_client -connect host:443 -servername host -showcerts
openssl s_client -connect host:443 -servername host -tls1_3
openssl x509 -in chain.pem -noout -subject -issuer -dates

First: does the name match. A server can present a perfectly valid certificate for the wrong name — that is what SNI exists to disambiguate, and a missing or mismatched -servername is the single most common cause of a confusing verification error.

Second: does the chain terminate in a root the client trusts. Servers that ship only the leaf certificate work in browsers that cache intermediates and fail everywhere else. Always serve the full chain.

Third: which protocol version actually got negotiated. Passing -tls1_3 turns a silent downgrade into an explicit failure, which is usually what you want when a client insists on modern TLS and a middlebox has other ideas.

← All notes