Solved

How to generate a CSR using OpenSSL?

Posted on 2014-01-14
10
1,018 Views
Last Modified: 2014-01-18
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!
0
Comment
Question by:Poly11
  • 5
  • 4
10 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 39781163
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.
0
 
LVL 33

Expert Comment

by:Dave Howe
ID: 39782056
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.
0
 

Author Comment

by:Poly11
ID: 39782349
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.
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 33

Expert Comment

by:Dave Howe
ID: 39782370
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.
0
 

Author Comment

by:Poly11
ID: 39782771
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
0
 
LVL 33

Expert Comment

by:Dave Howe
ID: 39782807
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
0
 

Author Comment

by:Poly11
ID: 39782826
Thanks, but is there any way I can remove the passphrase? The cert cannot have a passphrase with the appliance.
0
 

Author Comment

by:Poly11
ID: 39782849
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.
0
 
LVL 33

Accepted Solution

by:
Dave Howe earned 500 total points
ID: 39782872
the passphrase is only used for the keystore - its to protect it as the secret key is quite valuable. however, while the certificate (which is what you get BACK from the CA when you send a CSR) will not have a password, the secret key often does; you can export that separately from the XCA keystore, with or without a password (although pfx files always have a password if you export one of those)

XCA is a full featured CA in its own right - useful if you need that, but if all you need is to generate a few CSRs, it can do that too :)

For the CSR fault, try pasting it here:

http://www.sslshopper.com/csr-decoder.html
0
 

Author Closing Comment

by:Poly11
ID: 39790753
Thank you!
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

805 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question