2

I thought I would share the workaround I discovered today. It is not possible to create an RSA key in the manner I'm used to anymore....

Steps to reproduce:

  1. Install Java Development Kit jdk-6u30-windows-x64.exe on a Windows Server 2008 R2. Include the Public JRE.

  2. Run the JRE's bin\keytool utility with the following parameters:

    keytool -genseckey -alias FOO -keystore FOO.jks -keyalg RSA -validity 1825

Expected results:

Self signed certificate creation wizard

Actual results:

NoSuchAlgorithmException; cannot support algorithm "RSA"

Workaround:

Of course I tried using lowercase "rsa" but this did not work. What worked was to use the undocumented former method "-genkey" instead of "-genseckey"

0

1 Answer 1

6

The -genkey is obsolete parameter, in jdk6 is was replaced by -genkeypair. Use -genkeypair instead of -genseckey if you want to generate RSA keypair.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.