8129560: TestKeyPairGenerator.java fails on Solaris because private exponent needs to comply with FIPS 186-4
authorasmotrak
Mon, 04 Jan 2016 19:48:44 -0800
changeset 34875 ac52689ae546
parent 34874 55a62be87e89
child 34876 a634e2ae08ae
8129560: TestKeyPairGenerator.java fails on Solaris because private exponent needs to comply with FIPS 186-4 Reviewed-by: mullan Contributed-by: bhanu.prakash.gopularam@oracle.com
jdk/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java
--- a/jdk/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java	Mon Jan 04 14:34:53 2016 -0800
+++ b/jdk/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java	Mon Jan 04 19:48:44 2016 -0800
@@ -107,7 +107,7 @@
         data = new byte[2048];
         // keypair generation is very slow, test only a few short keys
         int[] keyLengths = {512, 512, 1024};
-        BigInteger[] pubExps = {null, BigInteger.valueOf(3), null};
+        BigInteger[] pubExps = {null, RSAKeyGenParameterSpec.F4, null};
         KeyPair[] keyPairs = new KeyPair[3];
         RandomFactory.getRandom().nextBytes(data);
         KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA", provider);