[英]Getting issued certificates' info from windows server 2008 CA
Is it possible to query certificate store on windows server 2008 using .net platform? 是否可以使用.net平台查询Windows Server 2008上的证书存储? I would like to get information about certificates that were issued by this system.
我想获取有关此系统颁发的证书的信息。
tnx grega g tnx grega g
With "issued certificates", do you mean certs that have been issued by this box, or to this box? 随着“颁发的证书”,你的意思是已经被这个盒子发出的, 或者这个盒子证书?
Anyway, something like this should get you started playing around with certificate stores: 无论如何,这样的事情应该可以让您开始使用证书存储:
using System;
using System.Security.Cryptography.X509Certificates;
class CertificateStoreSample
{
static void Main(string[] args)
{
X509Store store = new X509Store(StoreName.Root);
store.Open(OpenFlags.ReadOnly);
foreach (X509Certificate certificate in store.Certificates)
{
Console.WriteLine(certificate.Subject);
}
store.Close();
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.