Knowledgebase

Java Based Web Servers  Print this Article

Generating a Certificate Signing Request (CSR) using Java Based Web Servers

First create Keystore with Keytool. Use commend:

keytool -genkey -keyalg RSA -keysize 2048 -keystore domain.keystore

Enter keystore password: (remember it for later use).

The following questions will be asked:

  • What is your first and last name?
  • What is the name of your organizational unit?
  • What is the name of your organization?
  • What is the name of your City or Locality?
  • What is the name of your State or Province?
  • What is the two-letter country code for this unit?

You will then be asked if the information is correct:

Is CN=www.yourdomain.com, OU=Your Organizational Unit, O=Your Organization, L=Your City, ST=Your State, C=Your Country correct?

When you answer 'y' or 'yes' the password is then requested: Enter key password for <mykey>. Make a note of this password. <mykey> is the default alias for the certificate.

Now you can create CSR with Keytool:

keytool -certreq -keyalg RSA -file domain.csr -keystore domain.keystore

You will be prompted to enter the keystore password - if the password is correct then the CSR is created.

Was this answer helpful?

Related Articles

What is CSR and who needs it?
A Certificate Signing Request is a text generated on the server that is used to create your SSL...
Apache/OpenSSL
To generate a pair of private key and public Certificate Signing Request (CSR) for a webserver,...
Apache (with mod_ssl)
Installing SSL certificate on Apache with mod_ssl To install certificate you need 2...
Apache (Multi-Domain version)
To generate CSR file which includes more than one Fully Qualified Domain Name, you need to...
Apple Mac OS X Server
CSR is generated in 2 steps.I. Private key generation1. Log into server and open...