stunnel does not ensure a newline exists between certificate components
stunnel wants the private key, certificate, etc all inside a single file. However, it does not ensure that a newline exists between each component. If a user imports a private key without a newline at the end, it can lead to a badly formatted stunnel certificate, for example:
-----BEGIN PRIVATE KEY----- [...] -----END PRIVATE KEY----------BEGIN CERTIFICATE----- [...] -----END CERTIFICATE-----
#2 Updated by Steve Wheeler about 1 month ago
- Status changed from Feedback to Resolved
[2.4.4-RELEASE][email@example.com]/root: pkg info -x stunnel pfSense-pkg-stunnel-5.47_1 stunnel-5.47,1
Imported a cert using a private key with the trailing line feed character (0x0a) removed. Added it to STunnel. The .pem file was created successfully.