8204203: Many pkcs11 tests failed in Provider initialization, after compiler on Windows changed
Summary: Build NSS 3.41 with VS2017 and also upgrade to this NSS for macosx
Reviewed-by: valeriep
--- a/test/jdk/ProblemList.txt Thu May 02 22:52:51 2019 +0100
+++ b/test/jdk/ProblemList.txt Fri May 03 15:57:41 2019 +0800
@@ -665,65 +665,7 @@
sun/security/provider/KeyStore/DKSTest.sh 8180266 windows-all
-sun/security/pkcs11/Cipher/ReinitCipher.java 8204203 windows-all
-sun/security/pkcs11/Cipher/TestPKCS5PaddingError.java 8204203 windows-all
-sun/security/pkcs11/Cipher/TestRSACipher.java 8204203 windows-all
-sun/security/pkcs11/Cipher/TestRSACipherWrap.java 8204203 windows-all
-sun/security/pkcs11/Cipher/TestRawRSACipher.java 8204203 windows-all
-sun/security/pkcs11/Cipher/TestSymmCiphers.java 8204203 windows-all
-sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java 8204203 windows-all
-sun/security/pkcs11/KeyAgreement/SupportedDHKeys.java 8204203 windows-all
-sun/security/pkcs11/KeyAgreement/TestDH.java 8204203 windows-all
-sun/security/pkcs11/KeyAgreement/TestInterop.java 8204203 windows-all
-sun/security/pkcs11/KeyAgreement/TestShort.java 8204203 windows-all
-sun/security/pkcs11/KeyAgreement/UnsupportedDHKeys.java 8204203 windows-all
-sun/security/pkcs11/KeyGenerator/DESParity.java 8204203 windows-all
-sun/security/pkcs11/KeyGenerator/TestKeyGenerator.java 8204203 windows-all
-sun/security/pkcs11/KeyPairGenerator/TestDH2048.java 8204203 windows-all
-sun/security/pkcs11/KeyStore/SecretKeysBasic.sh 8204203,8209398 generic-all
-sun/security/pkcs11/Mac/MacKAT.java 8204203 windows-all
-sun/security/pkcs11/Mac/MacSameTest.java 8204203 windows-all
-sun/security/pkcs11/Mac/ReinitMac.java 8204203 windows-all
-sun/security/pkcs11/MessageDigest/ByteBuffers.java 8204203 windows-all
-sun/security/pkcs11/MessageDigest/DigestKAT.java 8204203 windows-all
-sun/security/pkcs11/MessageDigest/ReinitDigest.java 8204203 windows-all
-sun/security/pkcs11/MessageDigest/TestCloning.java 8204203 windows-all
-sun/security/pkcs11/Provider/ConfigQuotedString.sh 8204203 windows-all
-sun/security/pkcs11/Provider/Login.sh 8204203 windows-all
-sun/security/pkcs11/SampleTest.java 8204203 windows-all
-sun/security/pkcs11/Secmod/AddPrivateKey.java 8204203 windows-all
-sun/security/pkcs11/Secmod/Crypto.java 8204203 windows-all
-sun/security/pkcs11/Secmod/GetPrivateKey.java 8204203 windows-all
-sun/security/pkcs11/Secmod/JksSetPrivateKey.java 8204203 windows-all
-sun/security/pkcs11/Secmod/LoadKeystore.java 8204203 windows-all
-sun/security/pkcs11/Secmod/TestNssDbSqlite.java 8204203 windows-all
-sun/security/pkcs11/SecureRandom/Basic.java 8204203 windows-all
-sun/security/pkcs11/SecureRandom/TestDeserialization.java 8204203 windows-all
-sun/security/pkcs11/Serialize/SerializeProvider.java 8204203 windows-all
-sun/security/pkcs11/Signature/ByteBuffers.java 8204203 windows-all
-sun/security/pkcs11/Signature/ReinitSignature.java 8204203 windows-all
-sun/security/pkcs11/Signature/TestDSA.java 8204203 windows-all
-sun/security/pkcs11/Signature/TestDSAKeyLength.java 8204203 windows-all
-sun/security/pkcs11/Signature/TestRSAKeyLength.java 8204203 windows-all
-sun/security/pkcs11/ec/ReadCertificates.java 8204203 windows-all
-sun/security/pkcs11/ec/ReadPKCS12.java 8204203 windows-all
-sun/security/pkcs11/ec/TestCurves.java 8204203 windows-all
-sun/security/pkcs11/ec/TestECDH.java 8204203 windows-all
-sun/security/pkcs11/ec/TestECDH2.java 8204203 windows-all
-sun/security/pkcs11/ec/TestECDSA.java 8204203 windows-all
-sun/security/pkcs11/ec/TestECDSA2.java 8204203 windows-all
-sun/security/pkcs11/ec/TestECGenSpec.java 8204203 windows-all
-sun/security/pkcs11/rsa/KeyWrap.java 8204203 windows-all
-sun/security/pkcs11/rsa/TestCACerts.java 8204203 windows-all
-sun/security/pkcs11/rsa/TestKeyFactory.java 8204203 windows-all
-sun/security/pkcs11/rsa/TestKeyPairGenerator.java 8204203 windows-all
-sun/security/pkcs11/rsa/TestSignatures.java 8204203 windows-all
-sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java 8204203 windows-all
-sun/security/pkcs11/tls/TestLeadingZeroesP11.java 8204203 windows-all
-sun/security/pkcs11/tls/TestMasterSecret.java 8204203 windows-all
-sun/security/pkcs11/tls/TestPRF.java 8204203 windows-all
-sun/security/pkcs11/tls/TestPremaster.java 8204203 windows-all
-sun/security/tools/keytool/NssTest.java 8204203 windows-all
+sun/security/pkcs11/KeyStore/SecretKeysBasic.sh 8209398 generic-all
############################################################################
--- a/test/jdk/sun/security/pkcs11/PKCS11Test.java Thu May 02 22:52:51 2019 +0100
+++ b/test/jdk/sun/security/pkcs11/PKCS11Test.java Fri May 03 15:57:41 2019 +0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2019, 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
@@ -384,11 +384,14 @@
static boolean loadNSPR(String libdir) throws Exception {
// load NSS softoken dependencies in advance to avoid resolver issues
- safeReload(libdir + System.mapLibraryName("nspr4"));
- safeReload(libdir + System.mapLibraryName("plc4"));
- safeReload(libdir + System.mapLibraryName("plds4"));
- safeReload(libdir + System.mapLibraryName("sqlite3"));
- safeReload(libdir + System.mapLibraryName("nssutil3"));
+ String dir = libdir.endsWith(File.separator)
+ ? libdir
+ : libdir + File.separator;
+ safeReload(dir + System.mapLibraryName("nspr4"));
+ safeReload(dir + System.mapLibraryName("plc4"));
+ safeReload(dir + System.mapLibraryName("plds4"));
+ safeReload(dir + System.mapLibraryName("sqlite3"));
+ safeReload(dir + System.mapLibraryName("nssutil3"));
return true;
}
@@ -903,21 +906,21 @@
@Artifact(
organization = "jpg.tests.jdk.nsslib",
name = "nsslib-windows_x64",
- revision = "3.35",
+ revision = "3.41-VS2017",
extension = "zip")
private static class WINDOWS_X64 { }
@Artifact(
organization = "jpg.tests.jdk.nsslib",
name = "nsslib-windows_x86",
- revision = "3.35",
+ revision = "3.41-VS2017",
extension = "zip")
private static class WINDOWS_X86 { }
@Artifact(
organization = "jpg.tests.jdk.nsslib",
name = "nsslib-macosx_x64",
- revision = "3.35",
+ revision = "3.41",
extension = "zip")
private static class MACOSX_X64 { }
}
--- a/test/jdk/sun/security/tools/keytool/NssTest.java Thu May 02 22:52:51 2019 +0100
+++ b/test/jdk/sun/security/tools/keytool/NssTest.java Fri May 03 15:57:41 2019 +0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019, 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
@@ -47,6 +47,8 @@
copyFiles();
System.setProperty("nss", "");
System.setProperty("nss.lib", String.valueOf(libPath));
+
+ PKCS11Test.loadNSPR(libPath.getParent().toString());
KeyToolTest.main(args);
}