Discuss this help topic in SecureBlackbox Forum
Load CRL
There are two CRL-related components included in SecureBlackbox: TElCertificateRevocationList from the Base package and TElCertificateRevocationListEx from the PKI package. Depending on your needs you would choose one of the two components.
If you need a read-only access to CRLs (e.g., to check if the specific certificate is included), you'll be fine with the simpler TElCertificateRevocationList. If you want to edit your CRL, add certificates, and re-sign it, you should go for the extended component.
Loading a CRL into either component is simple:
TElCertificateRevocationList crl = new TElCertificateRevocationList();
r = crl.LoadFromBuffer(buf);
FileStream f = new FileStream("cacert.crl", FileMode.Open);
try
{
r = crl.LoadFromStream(f);
}
finally
{
f.Close();
}
Sometimes CRLs are stored in PEM format (base64-encoded data with headers). In these cases you need to use LoadFromBufferPEM() and LoadFromStreamPEM() methods. You can detect which format a particular CRL is stored in with the static TElCertificateRevocationList.DetectCRLFileFormat() method.