linux verify dates of SSL certificates
-
mister_v
- Posts: 203
- Joined: Thu Mar 04, 2010 9:19 pm
linux verify dates of SSL certificates
Hi, does anyone knows the linux command to show the expire date of an SSL certificate ?
-
chris
- Site Admin
- Posts: 216
- Joined: Mon Jul 21, 2008 9:52 am
Re: linux verify dates of SSL certificates
You can use the following command :
An example:
Code: Select all
echo | openssl s_client -servername SERVERNAME -connect SERVER:PORT 2>/dev/null | openssl x509 -noout -datesCode: Select all
echo | openssl s_client -servername www.webmaster2020.com -connect www.webmaster2020.com:443 2>/dev/null | openssl x509 -noout -dates
notBefore=Jun 24 00:00:00 2020 GMT
notAfter=Aug 1 23:59:59 2022 GMT
-
chris
- Site Admin
- Posts: 216
- Joined: Mon Jul 21, 2008 9:52 am
Re: linux verify dates of SSL certificates
If you havce access to the file directly:
Code: Select all
less certificate.crt | openssl x509 -noout -dates