如何从PEM EN codeD证书确定SSL证书到期日期? [英] How to determine SSL cert expiration date from a PEM encoded certificate?
本文介绍了如何从PEM EN codeD证书确定SSL证书到期日期?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我有实际的文件,并在Mac或Linux的Bash shell中,我怎么可以查询何时会过期证书文件?不是一个网站,但实际上该证书文件本身,假设我有社会责任,重点,PEM和链文件。
If I have the actual file and a Bash shell in Mac or Linux, how can I query the cert file for when it will expire? Not a web site, but actually the certificate file itself, assuming I have the csr, key, pem and chain files.
推荐答案
通过的OpenSSL
:
openssl x509 -enddate -noout -in file.pem
输出的是形式:
notAfter=Nov 3 22:23:50 2014 GMT
另请参见 MikeW对如何轻松地检查证书是否过期与否,或者是否会在一个答案一定的时间段,而不必解析上方的日期
Also see MikeW's answer for how to easily check whether the certificate has expired or not, or whether it will within a certain time period, without having to parse the date above.
这篇关于如何从PEM EN codeD证书确定SSL证书到期日期?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文