equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 |
23 |
24 /** |
24 /** |
25 * @test |
25 * @test |
26 * @bug 6298106 6275523 6420252 |
26 * @bug 6298106 6275523 6420252 8059627 |
27 * @summary make sure we can access the NSS trust anchor module |
27 * @summary make sure we can access the NSS trust anchor module |
28 * @author Andreas Sterbenz |
28 * @author Andreas Sterbenz |
29 * @library .. |
29 * @library .. |
30 * @run main/othervm TrustAnchors |
30 * @run main/othervm TrustAnchors |
31 */ |
31 */ |
41 public static void main(String[] args) throws Exception { |
41 public static void main(String[] args) throws Exception { |
42 if (initSecmod() == false) { |
42 if (initSecmod() == false) { |
43 return; |
43 return; |
44 } |
44 } |
45 |
45 |
46 if (System.getProperty("os.name").toLowerCase().startsWith("win")) { |
46 // our secmod.db file says nssckbi.*so*, so NSS does not find the |
47 // our secmod.db file says nssckbi.*so*, so NSS does not find the |
47 // *DLL* on Windows nor the *DYLIB* on Mac OSX. |
48 // *DLL* on windows. |
48 String osName = System.getProperty("os.name").toLowerCase(); |
49 System.out.println("Test currently does not work on Windows, skipping"); |
49 if (osName.startsWith("win") || osName.startsWith("mac")) { |
|
50 System.out.println("Test currently does not work on " + osName + |
|
51 ", skipping"); |
50 return; |
52 return; |
51 } |
53 } |
52 |
54 |
53 String configName = BASE + SEP + "nsstrust.cfg"; |
55 String configName = BASE + SEP + "nsstrust.cfg"; |
54 Provider p = getSunPKCS11(configName); |
56 Provider p = getSunPKCS11(configName); |