Avatar of Poly11
Poly11
Flag for United States of America asked on

How to generate a CSR using OpenSSL?

Good evening,

We have an appliance for a product called StorageCraft called ShadowControl CMD. It's responsible for monitoring the status of our backups and is running Ubuntu. Every time we log into the browser interface the check the status of the backups we are told that the certificate is not from a trusted source. Whenever I have requested a certificate for a server such as this the process has been pretty straight forward when generating the CSR - but not in this case. I searched the entire appliance interface and only found a section under "Security" that allows us to upload a certificate, but I can't get a certificate through a service like GoDaddy without a CSR.

I opened a support request with their support and got the following response:

"Hello,
You would use some other server at that site to run openSSL to generate all of your needed information.  Then you just upload the resulting files to the appliance. There isn't anything you would need from the server itself.
Thank you,"


I have no idea where to start and would be grateful if anybody reading this post can provide any guidance.

Thank you in advance!
Apache Web ServerLinux Security

Avatar of undefined
Last Comment
Poly11

8/22/2022 - Mon
Gary

On the server generate a key
openssl genrsa -des3 -out <keyfile_name>.key 2048
(enter passphrase when asked)

Then you can generate a CSR
openssl req -new -key <keyfile_name>.key -out <certificate_name>.csr
(enter the info at the various prompts)

Remove the passphrase from the key
cp <keyfile_name>.key <keyfile_name>.key.old
openssl rsa -in <keyfile_name>.key.old -out <keyfile_name>.key


Change the relevant file names above as you see fit.

Now goto whoever you use for SSL certs and give them the CSR file and you will get the SSL cert (and chain if necessary) to install on the server.

https://www.digitalocean.com/community/articles/how-to-create-a-ssl-certificate-on-nginx-for-ubuntu-12-04/

edit.
This is through a shell window.
Dave Howe

if it allows you to upload a PFX (aka pkcs #12 file) then you may find it easier to request a CSR via the xca tool - its the gui swiss army knife of SSL certificates, and much easier to get up and running than the command line openssl tool.
Poly11

ASKER
Thank you all for your posts. I will reply back once I have access to the server. This appliance was built with a pre-configured Ubuntu installation and we do not have access to the server. We only have access to the application that automatically starts up when it's powered-on.

I've tried the default "Ubuntu" user name with no password and had no luck. I have reached out to StorageCraft to see how we should be able to access the server. Once I have this info I will try your recommendations.

Thanks again.
Your help has saved me hundreds of hours of internet surfing.
fblack61
Dave Howe

you can build the CSR with either openssl or xca without having access to the server, but you *do* need to verify if you can upload a secret key, or if you have to generate against a secret key already created on the server.
Poly11

ASKER
Hi DaveHowe,

Thanks for the response, but I have no clue how to use openssl and Google searches produced little for me. Maybe I'm an idiot (which is the case here when it comes to issues like this) or I'm just not searching for the right items.

If you have a link that explains the process you describe that would be awesome.

Thx
Dave Howe

Well, I would suggest you use the XCA tool I linked earlier instead - there is a manual here but the TLDR version is..
1) install, select "new" to create a new keystore and set a password;

2) go to the CSR tab and select new request;

3) on the source tab, select the https_server template from the pulldown

4) on the subject tab, enter the details for the certificate (common name is the address of the server) and use the "Generate key" button to create a key (2048 bit)

5) hit OK, right click your new CSR, and export >> clipboard

6) paste into the CA page when prompted
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Poly11

ASKER
Thanks, but is there any way I can remove the passphrase? The cert cannot have a passphrase with the appliance.
Poly11

ASKER
OK, I tried this without entering a password and pasted the CSR and get this:

Invalid CSR submitted. Please re-create your CSR and submit your request again.

I'll investigate further and post back later. Thank you again.
ASKER CERTIFIED SOLUTION
Dave Howe

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Poly11

ASKER
Thank you!
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23