Examples (4)
Display the start and expiry dates for a domain's certificate
openssl s_client -connect host:port 2>/dev/null | openssl x509 -noout -datesDisplay the certificate presented by an SSL/TLS server
openssl < /dev/null s_client -connect host:portSet the Server Name Indicator (SNI) when connecting to the SSL/TLS server
openssl s_client -connect host:port -servername hostnameDisplay the complete certificate chain of an HTTPS server
openssl < /dev/null s_client -connect host:443 -showcertsmade by @shridhargupta | data from tldr-pages