Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm going to create a SSL Certificate so I can use https on my web site. I have to generate a Certificate Signing Request (CSR) and I did generate such a file with the Java keytool following the guide Generate a Certificate Signing Request (CSR) on Tomcat, but when I upload my CSR, I get a message from GlobalSign:

We suggest that a Bit Length of 2048 bits is used when generating your CSR. Please regenerate your CSR and select this Bit Length.

So how do I set the Bit Length to 2048 bits using the Java keytool?

I generated the CSR file with: keytool -certreq -keyalg RSA -alias your_alias_name -file certreq.csr -keystore your_keystore_filename

And before that I created my certificate keystore and private key with: keytool -genkey -alias your_alaias_name -keyalg RSA -keystore your_keystore_filename

share|improve this question
up vote 2 down vote accepted

Try adding -keysize 2048

Source: CSR Generation: Java-based Webservers (using keytool)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.