Linux查看SSL证书是否过期

使用OpenSSL工具,执行如下命令即可看到证书的有效起止时间:

openssl x509 -in <证书请求文件> -noout -dates

  

# openssl x509 -in /etc/leencrypt/live/app.xxx.com/fhain.pem  -noout -dates
notBefore=May 22 00:00:00 2017 GMT
notAfter=May 21 23:59:59 2020 GMT

  

原文地址:https://www.cnblogs.com/abclife/p/12421225.html