From 557b235157ccd63cc0282138480c19ad443f6f57 Mon Sep 17 00:00:00 2001 From: phh Date: Mon, 22 Oct 2018 15:20:49 +0000 Subject: [PATCH] 8129560: TestKeyPairGenerator.java fails on Solaris because private exponent needs to comply with FIPS 186-4 Summary: Replace BigInteger.valueof(3) with RSAKeyGenParameterSpec.F4 Reviewed-by: coffeys --- test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java b/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java index 92eb0f91b..cdf1672ad 100644 --- a/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java +++ b/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -103,7 +103,7 @@ public class TestKeyPairGenerator extends PKCS11Test { 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]; new Random().nextBytes(data); KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA", provider); -- GitLab