提交 557b2351 编写于 作者: P phh

8129560: TestKeyPairGenerator.java fails on Solaris because private exponent...

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
上级 9bd4755f
/*
* 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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册