-
Bug
-
Resolution: Fixed
-
P5
-
1.3.0
-
beta
-
generic, sparc
-
generic, solaris_7
Name: mc57594 Date: 12/05/99
java version "1.3beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3beta-O)
Java(TM) HotSpot Client VM (build 1.3beta-O, mixed mode)
Using java.security.spec.RSAKeyGenParameterSpec as an argument to the built in
RSA Keypair generator (e.g. kpg.initialize (spec)) fails with a
InvalidAlgorithmParameterException - "Parameter spec not RSA key pair gen.".
It looks like the com.sun.rsajca.JSA_RSAKeyPairGenerator is looking for the
internal com.sun.rsajca.RSAGenParameterSpec rather than
java.security.spec.RSAKeyGenParameterSpec.
// Generate the RSA Key Pair
// Using this will fail
RSAKeyGenParameterSpec rsaSpec =
new RSAKeyGenParameterSpec (1024, RSAKeyGenParameterSpec.F4);
// This is com.sun.rsajca.RSAGenParameterSpec - this will succeed.
// RSAGenParameterSpec rsaSpec =
// new RSAGenParameterSpec (1024, RSAKeyGenParameterSpec.F4);
KeyPairGenerator kpg = KeyPairGenerator.getInstance ("RSA",
"SunRsaSign");
kpg.initialize (rsaSpec);
System.out.print ("Starting key pair generation....");
KeyPair kp = kpg.generateKeyPair();
(Review ID: 98216)
======================================================================
sean.mullan@ireland 1999-12-22
Adjusted priority from 4 to 5 to reflect the fact that this will be
fixed after FCS.
- duplicates
-
JDK-4333184 can not use RSAKeyGenParameterSpec to initialize KeyPairGenerator
-
- Closed
-