Discuss this help topic in SecureBlackbox Forum

Add and remove certificates to and from the storage

To add the certificate to the storage, use Add() method of the corresponding storage object. Pass the certificate, which you want to add to the storage, as a parameter of the Add() method. Another parameter of the Add() method specifies, if the certificate should be added with the corresponding private key. Of course, the private key is added, if it is present in the certificate, which is added.

When you add the certificate to the storage, a copy of the certificate object is created, and the contents of the certificate are added to the storage. The original certificate object is not altered or added to the storage itself. If you attempt to read the certificate you have just added, you will obtain other object.

Add() method of TElWindowsCertStorage class is overloaded, i.e. several variants of the method exist. The basic method adds the certificate to "My" system store. The extended method lets you specify, to what system store the certificate is placed, and whether the private key can be exported later (if the private key is added). Note that the appropriate Windows storages should be provided via SystemStores property, depending on the value of the StorageType parameter.

To remove the certificate from the storage, use Remove() method of the corresponding storage object. The method removes the certificate from the storage and frees the associated object. If the storage held the certificate with its private key, the private key is also removed.

How To articles about certificate storages

Discuss this help topic in SecureBlackbox Forum