< prev index next >

test/jdk/sun/security/pkcs11/KeyAgreement/SupportedDHKeys.java

Print this page
rev 59383 : [mq]: final

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2020, 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -107,19 +107,16 @@
         }
 
         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(
< prev index next >