发新话题
打印

通过openssl s_client得到服务器的公钥文件

通过openssl s_client得到服务器的公钥文件

1)下载真实域名公钥/CA证书文件
echo | openssl s_client -connect trustgate.duckdns.org:443 2>/dev/null | openssl x509 -inform pem
2)下载并显示真实域名公钥/CA证书文件
echo | openssl s_client -connect trustgate.duckdns.org:443 2>/dev/null | openssl x509 -inform pem -noout -text
3)显示证书有效期
# echo | openssl s_client -connect trustgate.duckdns.org:443 2>/dev/null | openssl x509 -noout -enddate
notAfter=Jun  5 09:06:56 2022 GMT

参考:
https://serverfault.com/questions/661978/displaying-a-remote-ssl-certificate-details-using-cli-tools

[ 本帖最后由 linda 于 2022-3-9 19:05 编辑 ]

TOP

发新话题