0

This is the first time for me dealing with ssl.
I have created a csr file, but I lost the key file in this generation.
The certificate was issued and I got all the crt files. Now I want to install it on my nodejs server, but i cant because I dont have the generated key.
Can the csr file be converted to key? because in the csr I have:

-----BEGIN PRIVATE KEY-----
bla bla 
-----END PRIVATE KEY-----

Can that be a key file? Am i missing something here?
Thanks

SexyMF
  • 209
  • 1
  • 2
  • 10
  • 1
    No, a CSR can't be converted to a key. If you provided a file that includes a private key, a) your SSL vendor should've choked on the CSR b) you need a new key and a new certificate as the key is compromised and c) you need a new tutorial to follow because that one SUCKED. – ceejayoz Feb 10 '16 at 20:10
  • @ceejayoz Cant I re-generate my csr and get the key again? – SexyMF Feb 10 '16 at 20:11
  • No, you'd get a new key. – ceejayoz Feb 10 '16 at 20:11
  • 1
    SSL is a public-key / private-key system. It's as if a box had one key to lock something in the box, and another key to unlock and take things out. You put the public key on the website, everyone can get to it, encrypt information and send it to the server. On the server, only the server has the private key and it can decrypt and read the information. It's absolutely necessary that you have the private key, and it's a foundational part of SSL that nobody, including you, has any reasonable chance of creating a matching private key, if you don't have one already. – TessellatingHeckler Feb 10 '16 at 20:15
  • @ceejayoz , can you point me to a good tutorial? – SexyMF Feb 10 '16 at 20:16
  • @Shazam https://www.digitalocean.com/community/tutorials/openssl-essentials-working-with-ssl-certificates-private-keys-and-csrs – ceejayoz Feb 10 '16 at 20:18
  • @ceejayoz - I regenerate and make it work. thanks! – SexyMF Feb 10 '16 at 20:40

1 Answers1

4

No, unless you can find the private key you'll need to generate a new request (and hang on to that private key).

Katherine Villyard
  • 18,550
  • 4
  • 37
  • 59