code_junkie

Getting issued certificates' info from windows server 2008 CA

Nov 12th, 2011
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. using System;
  2. using System.Security.Cryptography.X509Certificates;
  3.  
  4. class CertificateStoreSample
  5. {
  6. static void Main(string[] args)
  7. {
  8. X509Store store = new X509Store(StoreName.Root);
  9.  
  10. store.Open(OpenFlags.ReadOnly);
  11.  
  12. foreach (X509Certificate certificate in store.Certificates)
  13. {
  14. Console.WriteLine(certificate.Subject);
  15. }
  16.  
  17. store.Close();
  18. }
  19. }
Add Comment
Please, Sign In to add comment