Reputation: 309
I have a private and public key in der format which i'm trying to convert into .pem format in order to extract the text between -----BEGIN CERTIFICATE-----
and -----END CERTIFICATE-----
.I've already achieved that for the public key, but for the private key i get the following error.
openssl rsa -noout -text -in priv.der
but i get an error 8536
with the private key with the message unable to load certificate
.Why is that?
Upvotes: 2
Views: 14558
Reputation: 9392
You need to use the -inform DER
command line option:
openssl rsa -noout -text -inform DER -in private.der
Upvotes: 4