简体   繁体   English

签名证书的指纹

[英]Thumbprint for a signing certificate

I need to extract Thumbprints of few binaries' certificates. 我需要提取一些二进制证书的指纹。 In PowerShell Get-AuthenticodeSignature can be used to get thumbprint value from binary, but if that file is Dual signed then also it shows only one thumbprint. 在PowerShell中,可以使用Get-AuthenticodeSignature从二进制文件获取指纹值,但是如果该文件是双重签名的,则它也仅显示一个指纹。 Is there any Powershell/ .NET utility to check multi thumbprints? 是否有任何Powershell / .NET实用程序可以检查多个指纹?

Check out this brilliant article about why it's not possible by default and what's the workaround for that. 查阅这篇精彩的文章,了解为什么默认情况下无法实现,以及解决方法是什么。

TL;DR: TL; DR:

Microsoft authenticode signature supports only one signature at a time. Microsoft authenticode签名一次仅支持一个签名。 Additional signatures are done as nested signatures. 其他签名作为嵌套签名完成。 First certificate can be easily accessed by using Get-AuthenticodeSignature and acessing SignerCertificate property. 使用Get-AuthenticodeSignature和访问SignerCertificate属性可以轻松访问第一个证书。 You have to use CryptoAPI to access additional certificates. 您必须使用CryptoAPI来访问其他证书。

Once you follow the steps from the linked article you can simply run the following to get the information you need: 按照链接文章中的步骤操作后,您只需运行以下命令即可获取所需信息:

PS C:\> $sig = Get-AuthenticodeSignatureEx "C:\path\to\file.dll"
PS C:\> $sig | fl *

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM