Retrieving Certificate Information from Windows Server 2008

Can I request a certificate store on a Windows 2008 server using the .net platform? I would like to receive information about the certificates issued by this system.

TPX grega g

0


source to share


1 answer


With "issued certificates" do you mean certificates issued by this field, or by this box?

Anyway, something like this should get you started playing with the 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();
    }
}

      

0


source







All Articles