Skip to main content

Test SSL/TLS connection

ProtocolPort
HTTPS443
IMAPS993
IMAP STARTTLS143
POP3S995
SMTPS465
SMTP STARTTLS587
OptionDescription
-showcertsShow full chain certificate
-servername <SNI>Set TLS SNI
-verify_return_errorStop if verification errors
openssl s_client [<options>] -connect <host>:<port>

Show TLS certificate

openssl s_client -connect <host>:<port> [-servername <SNI>] | openssl x509 [-noout] [-text]
openssl s_client -connect example.org:443 -servername example.org | openssl x509 -noout -text

Test SMTP / IMAP StartTLS

openssl s_client -starttls { smtp | imap | pop3 } -showcerts -connect <host>:<port> -servername <domain>
openssl s_client -starttls smtp -showcerts -connect example.org:587 -servername example.org