< prev index next >
test/jdk/sun/security/pkcs11/KeyAgreement/SupportedDHKeys.java
Print this page
rev 59107 : imported patch security
*** 107,125 ****
}
BigInteger leftOpen = BigInteger.ONE;
BigInteger rightOpen = p.subtract(BigInteger.ONE);
- // ignore the private key range checking on Solaris at present
- if (!provider.getName().equals("SunPKCS11-Solaris")) {
BigInteger x = privateKey.getX();
if ((x.compareTo(leftOpen) <= 0) ||
(x.compareTo(rightOpen) >= 0)) {
throw new Exception(
"X outside range [2, p - 2]: x: " + x + " p: " + p);
}
- }
BigInteger y = publicKey.getY();
if ((y.compareTo(leftOpen) <= 0) ||
(y.compareTo(rightOpen) >= 0)) {
throw new Exception(
--- 107,122 ----
< prev index next >