Wednesday, July 4, 2012

Verify expiry date of SSL Certificate using OpenSSL


Connect to the server using s_client and download the certificate to cert.txt
openssl s_client -connect server:port > cert.txt

Verify the expiry date from the downloaded certificate
openssl x509 -in cert.txt -noout -enddate