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!

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.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 ...