Fixing PEM routines:PEM_read_bio:bad end line error

Today we’ll be learning how to fix the following SSL error you might encounter when your SSL certificate has been misconfigured.

Most likely, you’ve concatenated both the intermediate CA bundle (typically intermediate.csr) and your SSL certificate together (SSL.crt), however, no line break has been created between each start and end points within the file, i.e.


This can cause some serious issues because it cannot be interpreted, as you might have noticed.

How to Fix SSL PEM routines:PEM_read_bio:bad end line error

To fix this issue, fire up your text editor of choice and create a line break between the two files, i.e.


Tip: Count five hyphens at the start and end of the text.

You can now save the file and the error should be fixed!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s