Security

`How to Fix the below PEM routines:PEM_read_bio:bad end line error`

sgarvin55
Splunk Employee
Splunk Employee

ERROR SSLCommon - Can't read key file c:\program files\splunkuniversalforwarder\etc\certs\name.pem errno=151441510 error:0906D066:PEM routines:PEM_read_bio:bad end line.

sgarvin55
Splunk Employee
Splunk Employee

This is most likely because the SSL certificate has been misconfigured.

Check your $SPLUNK_HOME\etc\certs\your_name.pem file. Look for a line that resembles the following:

-----END CERTIFICATE----------BEGIN CERTIFICATE-----

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, use a text editor of choice and create a line break between the two files, i.e.

-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----

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

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

kenoski
Path Finder

BTW,
This problem also occurs when you have a
-----END CERTIFICATE----------BEGIN RSA PRIVATE KEY-----
instead of
-----END CERTIFICATE-----
-----BEGIN RSA PRIVATE KEY-----

but not if you have
-----END RSA PRIVATE KEY----------BEGIN CERTIFICATE-----

Seems formatting is inconsistently mandated when parsing.

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...