Discuss this help topic in SecureBlackbox Forum
Access certificates in the storage
To access the certificate in the storage by its index, use Certificates property of TElCustomCertStorage class or its descendant. Use Count property to find out the total number of certificates, accessible using Certificates[] property.
Note, that the number, contained in Count property,
can be less than total number of certificates. For example, when you tell TElWinCertStorage
to access only My system store, Count property will contain only the number of certificates in the specified store.
Another way to get the certificate is to use FindByHash method.
This method lets you find the certificate by MD5 or SHA1 hash of the certificate.
Third method is to use the Lookup object and FindFirst/FindNext methods of TElCustomCertStorage class. Use of certificate lookup is described in the corresponding another how-to article.
When you access the certificate, the object is not copied, i.e. the object, contained in internal storage, is returned. This object is owned by the storage, and you should not dispose of it. If you need a copy of the object, use Clone method of TElX509Certificate to copy the object.