At the moment, when using spring.ssl.bundle.pem property with PEM encoded content, it works fine with what is defined in the PemPrivateKeyParser.java class.

Headers and footers defined as PKCS1_RSA_HEADER and PKCS1_RSA_FOOTER, PKCS8_HEADER and PKCS8_FOOTER, PKCS8_ENCRYPTED_HEADER and PKCS8_ENCRYPTED_FOOTER, SEC1_EC_HEADER and SEC1_EC_FOOTER.

However, most of the time we will have encrypted private keys that does not fit in those predefined keys.

Here is an example of the begining of the key which can be defined as PKCS1 ENCRYPTED I guess.

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

When using those types of keys, I get the following error:

"Missing private key or unrecognized format"

Which is thrown from the PemPrivateKeyParser class.

I think the parser cannot parse the two lines after the header.

It would be nice if you could had support for this type of private keys in a near future.

Thank you very much.