file .csr empty when i generate the key

Hello,

when i put this

openssl req -new -newkey rsa:2048 -nodes -days 365 -keyout www.mydomain.com.key -out www.mydomain.com.csr

i got the www.mydomain.com.csr file empty

i can't submit it to godaddy to got the .cer file.

Help please

4 Replies

I use this syntax to generate the CSR:

openssl req -newkey rsa:2048 > new.cert.csr      
openssl rsa -in privkey.pem -out new.cert.key

COMMON NAME should be the name of the web site. Enter any password for the first command, and then re-use it on the second command. The second line removes the passphrase from the privkey so it can be used on webservers

You will get back the cert file your SSL cert vendor. Let's call this "new.cert.cert" for this example.

Now with Apache you can use it:

      SSLCertificateFile _path_to_/new.cert.cert
      SSLCertificateKeyFile _path_to_/new.cert.key

If you need intermediate keys and CA stores (eg with startssl.com)

      SSLCertificateChainFile _path_to_/sub.class1.server.ca.pem
      SSLCACertificateFile _path_to_/ca.pem

Similar commands are available for other webservers (eg nginx); check the documentation.

Thanks for the answer but i always have a blank file csr. i don't know why.

Are you running the command I said? That's not the command you wrote.

openssl req -newkey rsa:2048 > new.cert.csr

openssl rsa -in privkey.pem -out new.cert.key

I found the mistake I was over my hard disk quota, I could not do anything.

Thanks again

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct