2014-10-20 172 views

回答

25

Google上搜寻了一段时间后,我想出了下面的代码段(UNIX):

openssl s_client -connect <host>:<port> < /dev/null 2>/dev/null | openssl x509 -text -in /dev/stdin | grep "Signature Algorithm" 

窗口(感谢名单尼克梅龙镇,见下文)

certutil -dump cacert.pem | find "Algorithm" 
11

我知道这个话题是老但我认为

openssl x509 -in yourcert.crt -text -noout | grep "Signature Algorithm" 

将是一个更简单的解决方案。

+0

这正是第一个答案最终确实。证书通常安装在Web服务器上并且不存在于文件中,并且rink.attendant.6的答案获取证书并在单行中运行验证检查 – 2016-11-23 13:03:18

+0

@ShalomCarmel,但是这对于像我一样的管理员有帮助要仔细检查我们继承的证书,并且可以通过shell访问服务器:) – 2018-01-31 15:15:38

2

没有指定一个平台,但在Windows命令提示符下,你可以使用:

certutil -dump cacert.pem | find "Algorithm" 
+0

包含您的答案,thanx – 2017-01-18 06:07:21

0

在PowerShell中

PS C:\> certutil -dump cacert.pem | findstr "Algorithm" 
相关问题