Problem: Unified SSL certificate error – SSL: error:0906D066:PEM routines:PEM_read_bio:bad end line
Cause:
The server had a unified file to hold the SSL certificate and intermediate certificate. But, on restarting the webserver, the above error showed up.
The ‘end of the line
’ was indeed good. The problem was due to a missing line break between the certificates.
Solution:
Replace,
-----END CERTIFICATE----------BEGIN CERTIFICATE-----
With,
—–END CERTIFICATE—– —–BEGIN CERTIFICATE—–
Note that there should be 5 hyphens at the beginning and end, of the
BEGIN/END
tags!