最新消息:20210917 已从crifan.com换到crifan.org

【已解决】CentOS中如何查看Let’s Encrypt的ssl证书的过期时间

证书 crifan 776浏览 0评论
折腾:
【未解决】小程序的ssl证书即将过期
期间,此处已经通过运行
sudo sh /root/xxx/renew_cert.sh
续签命令去延长Let’s Encrypt的ssl证书的时间了。
如何才能验证和确认,此处的ssl正式的时间,不是(还差12天左右)快要过期了,而是更新后的时间(还有3个月?才过期)
how verify letsencrypt ssl expire date
It there a command to show how many days certificate you have? – Server – Let’s Encrypt Community Support
Debian Package Tracker – ssl-cert-check
Checking certificates dates – Help – Let’s Encrypt Community Support
How to check for an expired certificate – Server – Let’s Encrypt Community Support
Checking SSL expiration Let’s Encrypt | Linode Questions
OpenSSL: Check SSL Certificate Expiration Date and More – ShellHacks
How to find Certifications Expiry Date – Help – Let’s Encrypt Community Support
openssl x509 -dates -noout < /path/to/certificate
可以看到:
root@VM-158-80-ubuntu:~/xxx# openssl x509 -dates -noout < /root/xxx/intermediate.pem 
notBefore=Mar 17 16:40:46 2016 GMT
notAfter=Mar 17 16:40:46 2021 GMT
root@VM-158-80-ubuntu:~/xxx# openssl x509 -dates -noout < /root/xxx/chained.pem 
notBefore=Aug 23 10:43:39 2019 GMT
notAfter=Nov 21 10:43:39 2019 GMT
此处用到的chained.pem的过期时间,是变成我们希望的:
2019年8月23号开始,2019年11月21号结束
另外顺带去看看网站
openssl s_client -servername www.xxx.ai -connect www.xxx.ai:443 2>/dev/null | openssl x509 -noout -dates
unable to load certificate
4765730412:error:09FFF06C:PEM routines:CRYPTO_internal:no start line:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.260.1/libressl-2.6/crypto/pem/pem_lib.c:683:Expecting: TRUSTED CERTIFICATE
Let’s Encrypt! Checking your HTTPS certificate expiration date | Jared Evans Global Microbrand
【总结】
openssl x509 -dates -noout < /path/to/your/chained.pem
 可以查看到ss证书的:
  • notBefore=开始时间
  • notAfter=结束时间=过期时间

转载请注明:在路上 » 【已解决】CentOS中如何查看Let’s Encrypt的ssl证书的过期时间

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
90 queries in 0.250 seconds, using 23.34MB memory