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 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...