如何检索在C#.NET动态库的证书信息 [英] How to retrieve certificate information of a .Net dll in c#

查看:163
本文介绍了如何检索在C#.NET动态库的证书信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要检索证书信息例如,颁发给,给定NET的DLL编程值发稿。

i want to retrieve certificate information e.g, "Issued to", "Issued by" values of a given .net dll programmatically.

在此先感谢!

推荐答案

您应该能够像这样做:

Assembly asm = Assembly.LoadFrom("your_assembly.dll");
string exe = asm.Location;
System.Security.Cryptography.X509Certificates.X509Certificate executingCert =
   System.Security.Cryptography.X509Certificates.X509Certificate.CreateFromSignedFile(exe); 
Console.WriteLine (executingCert.Issuer);

这篇关于如何检索在C#.NET动态库的证书信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆