Certchk 是一款快速的 HTTPS 证书检查工具。
获取安装
<pre class="brush:cpp ;toolbar: true; auto-links: false;">$ go get github.com/rapidloop/certchk</pre>
使用
<pre class="brush:cpp ;toolbar: true; auto-links: false;">$ go get github.com/rapidloop/certchk
$ certchk
Usage: certchk [-f file] servername ...
-f file
read server names from file
$ certchk mail.google.com facebook.com
Server | Certificate status
----------------+----------------------------------------------------------------
mail.google.com | valid, expires on 2016-05-31 (2 months from now)
facebook.com | valid, expires on 2016-12-30 (9 months from now)
$ cat /tmp/names
# this is a comment
www.netlanders.net
www.facebook.com
ttybuy.com
$ certchk -f /tmp/names mail.google.com
Server | Certificate status
-------------------+-------------------------------------------------------------
www.netlanders.net | x509: certificate signed by unknown authority
www.facebook.com | valid, expires on 2016-12-30 (9 months from now)
ttybuy.com | x509: certificate is valid for SV100, not ttybuy.com
mail.google.com | valid, expires on 2016-05-31 (2 months from now)</pre>