--- a/test/jdk/sun/security/pkcs11/PKCS11Test.java Wed Jul 25 17:21:04 2018 -0700
+++ b/test/jdk/sun/security/pkcs11/PKCS11Test.java Thu Jul 26 08:46:27 2018 +0800
@@ -154,7 +154,15 @@
public abstract void main(Provider p) throws Exception;
+ protected boolean skipTest(Provider p) {
+ return false;
+ }
+
private void premain(Provider p) throws Exception {
+ if (skipTest(p)) {
+ return;
+ }
+
// set a security manager and policy before a test case runs,
// and disable them after the test case finished
try {
@@ -327,9 +335,10 @@
}
static boolean isBadNSSVersion(Provider p) {
- if (isNSS(p) && badNSSVersion) {
+ double nssVersion = getNSSVersion();
+ if (isNSS(p) && nssVersion >= 3.11 && nssVersion < 3.12) {
System.out.println("NSS 3.11 has a DER issue that recent " +
- "version do not.");
+ "version do not, skipping");
return true;
}
return false;
@@ -667,9 +676,6 @@
private final static char[] hexDigits = "0123456789abcdef".toCharArray();
- static final boolean badNSSVersion =
- getNSSVersion() >= 3.11 && getNSSVersion() < 3.12;
-
private static final String distro = distro();
static final boolean badSolarisSparc =