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!

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...