changeset 10765:8a52480c82ac

8059627: Enable PKCS11 tests on Mac Reviewed-by: mullan
author vinnie
date Mon, 06 Oct 2014 16:44:57 +0100
parents c4c67022440e
children e31f880cd705
files test/sun/security/pkcs11/PKCS11Test.java test/sun/security/pkcs11/Secmod/TrustAnchors.java test/sun/security/pkcs11/nss/lib/macosx-x86_64/libfreebl3.dylib test/sun/security/pkcs11/nss/lib/macosx-x86_64/libnspr4.dylib test/sun/security/pkcs11/nss/lib/macosx-x86_64/libnss3.dylib test/sun/security/pkcs11/nss/lib/macosx-x86_64/libnssckbi.dylib test/sun/security/pkcs11/nss/lib/macosx-x86_64/libnssdbm3.dylib test/sun/security/pkcs11/nss/lib/macosx-x86_64/libnssutil3.dylib test/sun/security/pkcs11/nss/lib/macosx-x86_64/libplc4.dylib test/sun/security/pkcs11/nss/lib/macosx-x86_64/libplds4.dylib test/sun/security/pkcs11/nss/lib/macosx-x86_64/libsoftokn3.dylib test/sun/security/pkcs11/nss/lib/macosx-x86_64/libsqlite3.dylib test/sun/security/pkcs11/nss/lib/macosx-x86_64/libssl3.dylib
diffstat 13 files changed, 12 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/test/sun/security/pkcs11/PKCS11Test.java	Sun Oct 05 14:24:44 2014 +0100
+++ b/test/sun/security/pkcs11/PKCS11Test.java	Mon Oct 06 16:44:57 2014 +0100
@@ -189,6 +189,8 @@
         if (osName.startsWith("Win")) {
             osName = "Windows";
             NSPR_PREFIX = "lib";
+        } else if (osName.equals("Mac OS X")) {
+            osName = "MacOSX";
         }
         String osid = osName + "-"
                 + props.getProperty("os.arch") + "-" + props.getProperty("sun.arch.data.model");
@@ -507,6 +509,8 @@
             PKCS11_BASE + "/nss/lib/windows-i586/".replace('/', SEP)});
         osMap.put("Windows-amd64-64", new String[]{
             PKCS11_BASE + "/nss/lib/windows-amd64/".replace('/', SEP)});
+        osMap.put("MacOSX-x86_64-64", new String[]{
+            PKCS11_BASE + "/nss/lib/macosx-x86_64/"});
     }
 
     private final static char[] hexDigits = "0123456789abcdef".toCharArray();
--- a/test/sun/security/pkcs11/Secmod/TrustAnchors.java	Sun Oct 05 14:24:44 2014 +0100
+++ b/test/sun/security/pkcs11/Secmod/TrustAnchors.java	Mon Oct 06 16:44:57 2014 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, 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
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @bug 6298106 6275523 6420252
+ * @bug 6298106 6275523 6420252 8059627
  * @summary make sure we can access the NSS trust anchor module
  * @author Andreas Sterbenz
  * @library ..
@@ -43,10 +43,12 @@
             return;
         }
 
-        if (System.getProperty("os.name").toLowerCase().startsWith("win")) {
-            // our secmod.db file says nssckbi.*so*, so NSS does not find the
-            // *DLL* on windows.
-            System.out.println("Test currently does not work on Windows, skipping");
+        // our secmod.db file says nssckbi.*so*, so NSS does not find the
+        // *DLL* on Windows nor the *DYLIB* on Mac OSX.
+        String osName = System.getProperty("os.name").toLowerCase();
+        if (osName.startsWith("win") || osName.startsWith("mac")) {
+            System.out.println("Test currently does not work on " + osName +
+                ", skipping");
             return;
         }
 
Binary file test/sun/security/pkcs11/nss/lib/macosx-x86_64/libfreebl3.dylib has changed
Binary file test/sun/security/pkcs11/nss/lib/macosx-x86_64/libnspr4.dylib has changed
Binary file test/sun/security/pkcs11/nss/lib/macosx-x86_64/libnss3.dylib has changed
Binary file test/sun/security/pkcs11/nss/lib/macosx-x86_64/libnssckbi.dylib has changed
Binary file test/sun/security/pkcs11/nss/lib/macosx-x86_64/libnssdbm3.dylib has changed
Binary file test/sun/security/pkcs11/nss/lib/macosx-x86_64/libnssutil3.dylib has changed
Binary file test/sun/security/pkcs11/nss/lib/macosx-x86_64/libplc4.dylib has changed
Binary file test/sun/security/pkcs11/nss/lib/macosx-x86_64/libplds4.dylib has changed
Binary file test/sun/security/pkcs11/nss/lib/macosx-x86_64/libsoftokn3.dylib has changed
Binary file test/sun/security/pkcs11/nss/lib/macosx-x86_64/libsqlite3.dylib has changed
Binary file test/sun/security/pkcs11/nss/lib/macosx-x86_64/libssl3.dylib has changed