折腾:
【未解决】小程序的ssl证书即将过期
期间,此处已经通过运行
1 | sudo sh /root/xxx/renew_cert .sh |
续签命令去延长Let’s Encrypt的ssl证书的时间了。
如何才能验证和确认,此处的ssl正式的时间,不是(还差12天左右)快要过期了,而是更新后的时间(还有3个月?才过期)
how verify letsencrypt ssl expire date
1 | openssl x509 -dates -noout < /path/to/certificate |
可以看到:
1 2 3 4 5 6 | 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号结束
另外顺带去看看网站
1 2 3 | 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 |
【总结】
1 | openssl x509 -dates -noout < /path/to/your/chained .pem |
可以查看到ss证书的:
- notBefore=开始时间
- notAfter=结束时间=过期时间