haproxy and unable to load SSL certificate (weird one)

So, I was setting up a haproxy this morning and I was having a heck of a time getting it to load the SSL Certificate. I kept getting “Unable to load SSL certificate”, which was not a phrase google was helping me with.

It turned out that the BEGIN CERTIFICATE line, as issued from namecheap, only had four ‘-‘ characters where haproxy wanted to see five. I also couldn’t do a openssl x509 -text -in, I would get the error “140146308224672:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:703:Expecting: TRUSTED CERTIFICATE”.

So, that’s a hour of my life I’ll not get back, but hopefully someone else will now find this problem on google.

Leave a Reply