Discuss this help topic in SecureBlackbox Forum
Load the certificate
You can load the certificate and it's private key in various formats, either together from one file, or separately. For description of various formats of certifcate and key files see the corresponding how-to article.
To load the certificate, call corresponding LoadFromStream*() or LoadFromBuffer*() methods of TElX509Certificate. Asterisk denotes format name or nothing in case of DER format. If the file format supports saving of the associated private key, and the file includes a private key, this key will be loaded too. You can load the certificate or the key from the memory buffer or from the stream (be it file stream, or memory stream, or BLOB stream or some other stream). To load the private key to existing certificate object, call LoadKeyFromStream*() or LoadKeyFromBuffer*() methods of TElX509Certificate. Asterisk denotes format name or nothing in case of DER format.
When the certificate is loaded from the file, which contains multiple certificates, TElX509Certificate assumes that the file contains a certificate chain and attempts to load the end-entity certificate. If you want to select, what certificate must be loaded, use TElMemoryCertStorage object to load multiple certificates, and then pick the necessary certificate from the storage.