Reputation: 1805
I really didnt want to ask this but i cannot find a solid answer online that i understand. I am not good at networking/IIS/certificates and need some help. I have a CRT file generated from godaddy, i have it installed on the server but need to create a PEM file with a private key and the certificate inside it so i can do a key exchange. I have a DER file created, then a PEM file created using OpenSSL with the certificate in it. My question is how do i create a private key and then place it inside the PEM file? Im sorry if this doesnt make any sense, if so please just let me know i am on the wrong track. My goal is to set up an FTP key exchange and this is what a client of mine is requesting. the cert is in 2048 bit RSA format.
Upvotes: 0
Views: 11634
Reputation: 1805
Turns out this is what i needed, thanks for the assistance.
openssl pkcs12 -in file.pfx -nocerts –nodes -passin pass:123 | openssl rsa -out privatekey.pem
This got me a private RSA key, which is then put into FileZilla as the private key and the cert in the cert field in FileZilla's settings. Both of these files should be in a folder not protected by permissions and (not 100% sure on this part) should be in the same folder.
Upvotes: 0
Reputation: 9395
How do you create private key of the certificate you already have? You must have private key to sign the certificate signing request (CSR). You can export this private key into any format (provided that it is marked as exportable) you want.
If you can export the private key then one solution is that you can concatenate your file with private key and public key if it is supported by your application.
Another way is to combine them into pfx or PKCS #12 file.
You can see the about openssl pkcs12 here.
Upvotes: 0