代码改变世界

Linux查看SSL证书是否过期

2020-03-05 17:00  abce  阅读(11651)  评论(0编辑  收藏  举报

使用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