如何从已签名的.Net程序集中读取数字签名信息? [英] How do I read the digital signature information from a signed .Net assembly?
问题描述
我正在编写要在我们的软件构建过程中使用的程序集信息应用程序,并试图从已签名的.Net程序集读取数字签名信息.
I am writing an assembly information application to be used in our software build process and am trying to read the digital signature information from a signed .Net assembly.
我想用C#代码执行Windows资源管理器可以通过右键单击已签名的程序集并选择数字签名"选项卡,然后单击详细信息"按钮来执行的操作.例如
I want to do in my C# code what Windows Explorer can do by right-clicking a signed assembly and selecting the "Digital Signatures" tab and then clicking the Details button. e.g.
有人知道如何在C#中以编程方式执行此操作吗?我目前正在使用 Mono Cecil库从程序集中获取其余信息.非常感谢您的帮助.
Has anyone got an idea how to do this programmatically in C#? I am currently using the Mono Cecil library to get the rest of the information from the assembly. Your help will be most appreciated.
推荐答案
Mono项目为 chktrust
,您可以在自己的应用程序(开放源代码,MIT X11许可)中重复使用.
The Mono project provides source code for both signcode
and chktrust
that you can re-use inside your own application (open source, MIT X11 licensed).
两者都使用Mono.Security.dll
程序集(可在Windows上运行,而不仅仅是Linux和OSX),并包含一个
Both use Mono.Security.dll
assembly (which works under Windows, not just Linux and OSX) and include a quite complete Authenticode support.
这篇关于如何从已签名的.Net程序集中读取数字签名信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!