[openssl-dev] APIs to convert a downloaded DER format CRL file to PEM format

Patel, Anirudh (Anirudh) anirudhp at avaya.com
Tue Sep 6 07:00:14 UTC 2016


Hi Guys,

I have a task to perform where I need to convert a downloaded CRL file which is in DER format to PEM format. As of now I came across one API which helps me to read the downloaded CRL file.

    BIO*                     crlBIO = NULL;
    X509_CRL*       dlCRL  = NULL;
    bool                      retCode = false;

    if ((crlBIO = (BIO_new(BIO_s_file()))) == NULL)
    {
       return retCode;
    }

    if (BIO_read_filename(crlBIO, hashFilePath) == 0)
    {
        return retCode;
    }

   if ((dlCRL = d2i_X509_CRL_bio(crlBIO, NULL)) == NULL)
   {
   }
Now can I convert this dlCRL to PEM format? All this needs to be done programmatically and not by executing openssl crl commands.

Thanks,
Anirudh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-dev/attachments/20160906/d2514a09/attachment.html>


More information about the openssl-dev mailing list