5

I have windows .crl file. Can I convert it into a .pem file to nginx using openssl?

openssl crl -in crl.crl -noout -text  
unable to load CRL
139765490861728:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:703:Expecting: X509 CRL

1 Answers1

7

The error means that your crl file is not encoded properly in PEM format with right header and footer. Have the right PEM encoded crl file.

If the CRL is in DER format:

openssl crl -in your_current.crl -inform DER -out crl.pem

Now you can use crl.pem as you mentioned in question.

openssl crl -in crl.pem -noout -text

Prabhu
  • 3,443
  • 15
  • 26
  • It must be in DER format. I will update the answer. Try that, – Prabhu Apr 16 '15 at 12:57
  • This is exactly what I needed to convert [AddTrustExternalCARoot.crl](http://crl.usertrust.com/AddTrustExternalCARoot.crl) into the appropriate X509 CRL format for PostgreSQL 9.6. – Parker May 28 '19 at 20:15