StartSSL - Missing or invalid SSL private key : Line 2 does not look like PEM format

Hello,

My ssl.key works fine when I test it with openssl, but Virtualmin complains as per the subject " Missing or invalid SSL private key : Line 2 does not look like PEM format". I believe because my ssl.key contains these lines for line 2:


-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-256-CBC,3C5C27899BDC440E394E8E711721DF1B

OAwynf8KjZvPL/hNrxq9devIrW68mhyh4B4BxKVVFVqbcDA6m98bssN1SRuSHJsb
Ov/I9Jj6m

A key I installed a year ago did not contain the proc type and dek ifno lines, but without these openssl does not recognize the key. Any tips?

PS: After manual install the server works fine. Except I couldn't input the password into webmin, so I may need to strip the password protection from the key.

Status: 
Active

Comments

I suspect you're right about what the issue is, but just to rule out a simpler fix -- is there actually a line break in the middle of your SSL cert? Or is that just a copy and paste issue?

If there's really a line break there, could you try removing that?

But yeah, if that's not the issue, than you could either try removing the encryption, or you could setup a self-signed SSL cert which uses the same password, and then just overwrite it with your current SSL cert/key.

If the issue isn't related to the line break, Jamie will be able to look into that to figure out what's going on there.

Yes, that is an empty line :)

I solved the issue by removing the password protection with openssl that also removed those top lines, so I ended up with a key like

-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEA07lrqGVn7jzDP0cbJbe...

That was REALLY helpful! Using the decrypted key solved this issue, though this does not make any sense to me...