![]() |
Chilkat HOME Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi DLL Go Java Node.js Objective-C PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(ASP) List Windows Local Machine CertificatesDemonstrates how to open the registry-based Local Machine certificate store on a Windows OS and list the digital certificates. <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body> <% ' This example demonstrates how to list the certificates ' in a Windows Local Machine Certificate Store. ' This is our certificate store factory object: set ccs = Server.CreateObject("Chilkat.CreateCS") ccs.ReadOnly = 1 ' Open the local machine store: ' cs is a Chilkat.CertStore Set cs = ccs.OpenLocalSystemStore() If (Not (cs Is Nothing )) Then numCerts = cs.NumCertificates ' Print the distinguished name of each certificate For i = 0 To numCerts - 1 ' cert is a Chilkat.Cert Set cert = cs.GetCertificate(i) Response.Write "<pre>" & Server.HTMLEncode( cert.SubjectDN) & "</pre>" Next Else Response.Write "<pre>" & Server.HTMLEncode(ccs.LastErrorText) & "</pre>" End If ' The Chilkat Certificate, Certificate Store, Private Key, ' Public Key, and Key Container classes / objects are freeware. ' They are used by and included with the Chilkat Email, ' Crypt, S/MIME, and other commercial Chilkat components. %> </body> </html> |
© 2000-2026 Chilkat Software, Inc. All Rights Reserved.