--- a/jdk/make/sun/security/Makefile Fri Mar 02 17:24:08 2012 +0000
+++ b/jdk/make/sun/security/Makefile Mon Mar 05 14:13:29 2012 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1996, 2011, 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
@@ -44,6 +44,16 @@
JGSS_WRAPPER = jgss/wrapper
endif
+# Build PKCS#11 on all platforms except 64-bit Windows.
+# We exclude windows-amd64 because we don't have any
+# 64-bit PKCS#11 implementations to test with on that platform.
+PKCS11 = pkcs11
+ifeq ($(ARCH_DATA_MODEL), 64)
+ ifeq ($(PLATFORM), windows)
+ PKCS11 =
+ endif
+endif
+
# Build Microsoft CryptoAPI provider only on Windows platform.
MSCAPI =
ifeq ($(PLATFORM), windows)
@@ -58,7 +68,7 @@
endif
SUBDIRS = $(INTREE_EC) other action util krb5
-SUBDIRS_misc = jgss pkcs11 $(JGSS_WRAPPER) $(MSCAPI) smartcardio
+SUBDIRS_misc = jgss $(PKCS11) $(JGSS_WRAPPER) $(MSCAPI) smartcardio
SUBDIRS_tools = tools
include $(BUILDDIR)/common/Subdirs.gmk
--- a/jdk/src/share/classes/sun/security/pkcs11/Config.java Fri Mar 02 17:24:08 2012 +0000
+++ b/jdk/src/share/classes/sun/security/pkcs11/Config.java Mon Mar 05 14:13:29 2012 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2011, 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
@@ -197,9 +197,6 @@
// (false).
private boolean useEcX963Encoding = false;
- // The minimum library version number
- private String libraryVersionCheck = null;
-
private Config(String filename, InputStream in) throws IOException {
if (in == null) {
if (filename.startsWith("--")) {
@@ -332,10 +329,6 @@
return useEcX963Encoding;
}
- String getLibraryVersionCheck() {
- return libraryVersionCheck;
- }
-
private static String expand(final String s) throws IOException {
try {
return PropertyExpander.expand(s);
@@ -458,8 +451,6 @@
nssUseSecmodTrust = parseBooleanEntry(word);
} else if (word.equals("useEcX963Encoding")) {
useEcX963Encoding = parseBooleanEntry(word);
- } else if (word.equals("libraryVersionCheck")) {
- libraryVersionCheck = parseStringEntry(word);
} else {
throw new ConfigurationException
("Unknown keyword '" + word + "', line " + st.lineno());
--- a/jdk/src/share/classes/sun/security/pkcs11/SunPKCS11.java Fri Mar 02 17:24:08 2012 +0000
+++ b/jdk/src/share/classes/sun/security/pkcs11/SunPKCS11.java Mon Mar 05 14:13:29 2012 +0000
@@ -342,18 +342,6 @@
System.out.println("Library info:");
System.out.println(p11Info);
}
-
- // Check library version number
- String libraryVersionCheck = config.getLibraryVersionCheck();
- if (libraryVersionCheck != null) {
- if (p11Info.libraryVersion.toString()
- .compareTo(libraryVersionCheck) < 0) {
- throw new ProviderException(
- "Cryptoki library version check failed: " +
- "installed version is " + p11Info.libraryVersion);
- }
- }
-
if ((slotID < 0) || showInfo) {
long[] slots = p11.C_GetSlotList(false);
if (showInfo) {
--- a/jdk/test/ProblemList.txt Fri Mar 02 17:24:08 2012 +0000
+++ b/jdk/test/ProblemList.txt Mon Mar 05 14:13:29 2012 +0000
@@ -234,6 +234,16 @@
# 7147060
com/sun/org/apache/xml/internal/security/transforms/ClassLoaderTest.java generic-all
+# Failing on Solaris i586, 3/9/2010, not a -samevm issue (jdk_security3)
+sun/security/pkcs11/Secmod/AddPrivateKey.java solaris-i586
+sun/security/pkcs11/ec/ReadCertificates.java solaris-i586
+sun/security/pkcs11/ec/ReadPKCS12.java solaris-i586
+sun/security/pkcs11/ec/TestCurves.java solaris-i586
+sun/security/pkcs11/ec/TestECDSA.java solaris-i586
+#sun/security/pkcs11/ec/TestECGenSpec.java solaris-i586
+#sun/security/pkcs11/ec/TestKeyFactory.java solaris-i586
+sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java solaris-i586
+
# Fails on Fedora 9/Ubuntu 10.04 64bit, PKCS11Exception: CKR_DEVICE_ERROR
sun/security/pkcs11/KeyAgreement/TestDH.java generic-all
--- a/jdk/test/sun/security/pkcs11/PKCS11Test.java Fri Mar 02 17:24:08 2012 +0000
+++ b/jdk/test/sun/security/pkcs11/PKCS11Test.java Mon Mar 05 14:13:29 2012 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2007, 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
@@ -42,9 +42,6 @@
// directory corresponding to BASE in the /closed hierarchy
static final String CLOSED_BASE;
- // Minimum supported NSS library version
- private static final String MINIMUM_SUPPORTED_NSS_VERSION = "3.12";
-
static {
// hack
String absBase = new File(BASE).getAbsolutePath();
@@ -132,13 +129,6 @@
}
private static String PKCS11_BASE;
- static {
- try {
- PKCS11_BASE = getBase();
- } catch (Exception e) {
- // ignore
- }
- }
private final static String PKCS11_REL_PATH = "sun/security/pkcs11";
@@ -170,18 +160,20 @@
}
String osid = osName + "-"
+ props.getProperty("os.arch") + "-" + props.getProperty("sun.arch.data.model");
- String nssLibDir = osMap.get(osid);
- if (nssLibDir == null) {
+ String ostype = osMap.get(osid);
+ if (ostype == null) {
System.out.println("Unsupported OS, skipping: " + osid);
return null;
-// throw new Exception("Unsupported OS " + osName);
+// throw new Exception("Unsupported OS " + osid);
}
- if (nssLibDir.length() == 0) {
+ if (ostype.length() == 0) {
System.out.println("NSS not supported on this platform, skipping test");
return null;
}
- System.setProperty("pkcs11test.nss.libdir", nssLibDir);
- return nssLibDir;
+ String base = getBase();
+ String libdir = base + SEP + "nss" + SEP + "lib" + SEP + ostype + SEP;
+ System.setProperty("pkcs11test.nss.libdir", libdir);
+ return libdir;
}
protected static void safeReload(String lib) throws Exception {
@@ -199,8 +191,6 @@
safeReload(libdir + System.mapLibraryName(NSPR_PREFIX + "nspr4"));
safeReload(libdir + System.mapLibraryName(NSPR_PREFIX + "plc4"));
safeReload(libdir + System.mapLibraryName(NSPR_PREFIX + "plds4"));
- safeReload(libdir + System.mapLibraryName("sqlite3"));
- safeReload(libdir + System.mapLibraryName("nssutil3"));
return true;
}
@@ -230,12 +220,7 @@
customConfig :
base + SEP + "nss" + SEP + customConfigName;
- System.out.println("[WARNING: NSS libraries loaded from " + libdir +
- " must be at least version " +
- MINIMUM_SUPPORTED_NSS_VERSION + "]");
System.setProperty("pkcs11test.nss.lib", libfile);
- System.setProperty("pkcs11test.nss.libVersionCheck",
- MINIMUM_SUPPORTED_NSS_VERSION);
System.setProperty("pkcs11test.nss.db", dbdir);
Provider p = getSunPKCS11(p11config);
test.premain(p);
@@ -244,19 +229,15 @@
private static final Map<String,String> osMap;
- // Location of the NSS libraries on each supported platform
static {
osMap = new HashMap<String,String>();
- osMap.put("SunOS-sparc-32", "/usr/lib/mps/");
- osMap.put("SunOS-sparcv9-64", "/usr/lib/mps/64/");
- osMap.put("SunOS-x86-32", "/usr/lib/mps/");
- osMap.put("SunOS-amd64-64", "/usr/lib/mps/64/");
- osMap.put("Linux-i386-32", "/usr/lib/");
- osMap.put("Linux-amd64-64", "/usr/lib64/");
- osMap.put("Windows-x86-32",
- PKCS11_BASE + "/nss/lib/windows-i586/".replace('/', SEP));
- osMap.put("Windows-amd64-64",
- PKCS11_BASE + "/nss/lib/windows-amd64/".replace('/', SEP));
+ osMap.put("SunOS-sparc-32", "solaris-sparc");
+ osMap.put("SunOS-sparcv9-64", "solaris-sparcv9");
+ osMap.put("SunOS-x86-32", "solaris-i586");
+ osMap.put("SunOS-amd64-64", "solaris-amd64");
+ osMap.put("Linux-i386-32", "linux-i586");
+ osMap.put("Linux-amd64-64", "linux-amd64");
+ osMap.put("Windows-x86-32", "windows-i586");
}
private final static char[] hexDigits = "0123456789abcdef".toCharArray();
--- a/jdk/test/sun/security/pkcs11/nss/lib/README Fri Mar 02 17:24:08 2012 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-This copy of the Mozilla NSS-3.13.1 libraries is used by the PKCS11 tests.
-The following source code versions were used to build these libraries:
- NSS_3.13.1_RTM
- NSPR_4.8.9_RTM
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/freebl3.chk has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/freebl3.dll has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/libnspr4.dll has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/libnspr4.lib has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/libplc4.dll has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/libplc4.lib has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/libplds4.dll has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/libplds4.lib has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nss3.dll has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nss3.lib has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nssckbi.dll has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nssdbm3.chk has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nssdbm3.dll has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nssutil3.dll has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/nssutil3.lib has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/softokn3.chk has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/softokn3.dll has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/sqlite3.dll has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/ssl3.dll has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-amd64/ssl3.lib has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-i586/freebl3.chk has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-i586/freebl3.dll has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-i586/libnspr4.dll has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-i586/libnspr4.lib has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-i586/libplc4.dll has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-i586/libplc4.lib has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-i586/libplds4.dll has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-i586/libplds4.lib has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nss3.dll has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nss3.lib has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nssckbi.dll has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nssdbm3.chk has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nssdbm3.dll has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nssutil3.dll has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-i586/nssutil3.lib has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-i586/softokn3.chk has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-i586/softokn3.dll has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-i586/sqlite3.dll has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-i586/ssl3.dll has changed
Binary file jdk/test/sun/security/pkcs11/nss/lib/windows-i586/ssl3.lib has changed
--- a/jdk/test/sun/security/pkcs11/nss/p11-nss.txt Fri Mar 02 17:24:08 2012 +0000
+++ b/jdk/test/sun/security/pkcs11/nss/p11-nss.txt Mon Mar 05 14:13:29 2012 +0000
@@ -9,8 +9,6 @@
library = ${pkcs11test.nss.lib}
-libraryVersionCheck = ${pkcs11test.nss.libVersionCheck}
-
nssArgs = "configdir='${pkcs11test.nss.db}' certPrefix='' keyPrefix='' secmod='secmod.db' flags=readOnly"
# HMAC_SHA256/384/512 broken until NSS 3.10.2
--- a/jdk/test/sun/security/tools/keytool/autotest.sh Fri Mar 02 17:24:08 2012 +0000
+++ b/jdk/test/sun/security/tools/keytool/autotest.sh Mon Mar 05 14:13:29 2012 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2009, 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
@@ -50,7 +50,7 @@
ARCH=`isainfo`
case "$ARCH" in
sparc* )
- NSSDIR="/usr/lib/mps"
+ PF="solaris-sparc"
;;
* )
echo "Will not run test on: Solaris ${ARCH}"
@@ -64,7 +64,7 @@
FS="/"
case "$ARCH" in
i[3-6]86 )
- NSSDIR="/usr/lib"
+ PF="linux-i586"
;;
* )
echo "Will not run test on: Linux ${ARCH}"
@@ -91,7 +91,7 @@
chmod u+w cert8.db
echo | ${TESTJAVA}${FS}bin${FS}java -Dnss \
- -Dnss.lib=${NSSDIR}${FS}${LIBNAME} \
+ -Dnss.lib=${NSS}${FS}lib${FS}${PF}${FS}${LIBNAME} \
KeyToolTest
status=$?