I'm running this command on my pc (Openssl version: 1.0.1) :
openssl pkcs8 -inform DER -in file.key -passin pass:12345678a -outform PEM -out key.pem
and i got this key.pem:
-----BEGIN PRIVATE KEY-----
MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBANCFPVXwO+6qQdOs
...
wVauPfh0cGEf1Kc=
-----END PRIVATE KEY-----
But when i run the same command it from my server (Openssl version: 0.9.8e-fips-rhel5) i get this output:
-----BEGIN RSA PRIVATE KEY-----
MIICXQIBAAKBgQDQhT1V8DvuqkHTrMPFUUAXUl0ihDGoiD86SqK8Z3n19yp1VrJf
...
zHY0343VXnpM2opKwG2E1zgfHfbcLMFWrj34dHBhH9Sn
-----END RSA PRIVATE KEY-----
The Base64 inside is differente and also the headers:
-----BEGIN PRIVATE KEY-----
-----BEGIN RSA PRIVATE KEY-----
The first one works for me, how could i get the -----BEGIN PRIVATE KEY----- output on the 0.9.8 version?
I found this on OpenSsl patch notes:
Change default private key format to PKCS#8.
so, that could be the main issue, i hope someone could help me with this, i dont find the way to get the private key but not the BEGIN RSA PRIVATE KEY one.
Thanks