CryptoStore Object

Overview

The CryptoStore represents a certificate store. An instance of this object can be created using CryptoManager's OpenStore and OpenStoreFromPFX methods.

Member List

Properties


Certificates As CryptoCerts (Read-only)

Returns a collection of CryptoCert objects residing in this store. Individual certificates can be referenced within this collection using an integer index (from 1 to Store.Certificates.Count) or a certificate's serial number.

Usage:

For Each Cert in Store.Certificates
  ' do something with Cert
Next

or

Set Cert = Store.Certificates("0380 4327 9000 70BF 11D3 58DC DD21 C55D")

CRLs As CryptoCrls (Read-only)

Returns a collection of CryptoCRL objects residing in this store. Individual CRLs can be referenced within this collection using an integer index (from 1 to Store.CRLs.Count).

Usage:

For Each CRL in Store.CRLs
  ' do something with CRL
Next

Name As String (Read-only)

Returns the store name.

Methods


Sub AddCertificate(Cert As CryptoCert, Optional Disposition = 3)

Saves Cert to the store. Disposition specifies the action to take if a matching certificate already exists in the store. It can be set to one of the following values: 1 (Add New), 2 (Use Existing), 3 (Replace Existing, default), or 4 (Add Always).

Usage:

Store.AddCertificate Cert

Related Task: 7.2 Certification Authority Hierarchy..


Sub AddCrl(CRL As CryptoCrl, Optional Disposition = 3)

Saves CRL to the store. Disposition specifies the action to take if a matching CRL already exists in the store. It can be set to one of the following values: 1 (Add New), 2 (Use Existing), 3 (Replace Existing, default), or 4 (Add Always).

Usage:

Store.AddCrl Crl

Sub DeleteCertificate(SerialNumber As String)

Deletes a certificate specified by its serial number from the store.

Usage:

Store.DeleteCertificate "0380 4327 9000 70BF 11D3 58DC DD21 C55D"

Sub DeleteCrl(Index As Integer)

Deletes a CRL specified by a 1-based index from the store.

Usage:

Store.DeleteCrl 2
CryptoCrl CryptoName