是否有命令行实用程序来提取证书指纹?
我已经创建了机器证书。它出现在证书(本地计算机)\个人\证书证书存储库文件夹中。现在我希望使用命令行实用程序提取其指纹。
不幸的是,我能找到的最接近的东西是在这篇文章中。
我需要能够在从 XP 开始的任何 Windows 操作系统上执行此过程。
谢谢。
I have created a machine certificate. It appears in the Certificates (Local Computer)\Personal\Certificates certificate repository folder. Now I wish to extract its thumbprint using a command line utility.
Unfortunately, the closest thing that I could find is in this article.
I need to be able to perform this procedure on any Windows OS starting with XP.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
老了,但这也许会对某人有所帮助。将以下内容放入 powershell 脚本(.ps1)中并运行它。它将把拇指打印到屏幕上。观看我的粘贴中的自动换行。
Old, but maybe this will help someone. Put the following in a powershell script(.ps1) and run it. It will print the thumb to the screen. watch the word wrap in my paste.
直接从命令行获取未安装的 .cer 文件,并删除嵌入的空格(可能可以改进):
Direct from command-line for a .cer file that isn't installed, and removes the embedded spaces (can probably be improved):
直接从文件 .cer 获取指纹
Get thumbprint directly from file .cer
就我而言,我无法使用 PowerShell,因此我编写了此脚本来与 cscript.exe 一起运行,它将使用正则表达式为您提供帮助。
In my case I could not use PowerShell, so I wrote this script to run with cscript.exe that will get you the thumb using a Regular Expression.
电源外壳
获取子项目证书:\LocalMachine\My
powershell
Get-Childitem Cert:\LocalMachine\My
这是一个简单的 python 脚本来执行此操作:
Here is a simple python script to do this: