Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert .pem into .key?

I already have purchased SSL certificate and i have received certificate and a .pem file as a private key? from the supplier; now i need to convert this .pem key into .key for bitnami Redmine Apache web server in order to make it work.

How do I go about doing this what what program or commands to do this? I am a newbie in terms of using Openssl etc to do this.

Any advice would be much appreciated!

Thank you.

like image 704
user1644587 Avatar asked Nov 14 '13 13:11

user1644587


People also ask

Is PEM same as key file?

PEM is a file format that may consist of a certificate (aka. public key), a private key or indeed both concatenated together. Don't pay so much attention to the file extension; it means Privacy Enhanced Mail, a use it didn't see much use for but the file format stuck around.


2 Answers

I assume you want the DER encoded version of your PEM private key.

openssl rsa -outform der -in private.pem -out private.key 
like image 114
Camille G. Avatar answered Dec 03 '22 21:12

Camille G.


openssl rsa -in privkey.pem -out private.key does the job.

like image 38
JAFP Avatar answered Dec 03 '22 22:12

JAFP