Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am trying to install SSL certificate from a certificate authority into my httpd server in CentOS 5.x. When I configure it and start the server I am getting the following errors,

[error]Init: Unable to read server certificate from file /etc/pki/tls/certs/ssl_certificate.crt
[error] SSL Library Error: 218570875 error:0D07207B:asn1 encoding routines:ASN1_get_object:header too long

I am following the procedure at to set up the ssl

Any pointers would be greatly helpful

share|improve this question
Could you please post the certificate file and the relevant config snippets? It seems that openssl doesn't like your certificate, but without more info, it's hard to say anything. – Lacek Mar 12 '12 at 8:24

2 Answers 2

up vote 1 down vote accepted

The cert is probably faulty/corrupt. Can you regenerate from the authority?

For example, look at:


You can do some checks on the certificate using openssl:

openssl x509 -in /etc/pki/tls/certs/ssl_certificate.crt -text -noout

That should dump out the plain text of your certificate information. If it can't then there's something wrong with the certificate file.

share|improve this answer
Yes the cert was faulty :( Thanks – Abhishek Mar 14 '12 at 1:35

I ran across the same issue. Heres my story and solution:

I've been saving the cert as UTF-8 with BOM (Byte order Mark) So you can just open that file with vim and save it without BOM:

# vim cert.pem
:set nobomb


share|improve this answer
Thank you! You saved my day! – Joachim Nilsson Jul 14 at 9:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.