C# 如何在c中检索.Net dll的证书信息#

C# 如何在c中检索.Net dll的证书信息#,c#,.net,C#,.net,我想以编程方式检索给定.net dll的证书信息,例如“颁发给”、“颁发者”值 提前谢谢 您应该能够通过以下方式完成: Assembly asm = Assembly.LoadFrom("your_assembly.dll"); string exe = asm.Location; System.Security.Cryptography.X509Certificates.X509Certificate executingCert = System.Security.Cryptograph

我想以编程方式检索给定.net dll的证书信息,例如“颁发给”、“颁发者”值


提前谢谢

您应该能够通过以下方式完成:

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);