jdk/test/java/security/Provider/DefaultPKCS11.java
changeset 11523 85131f3172a1
parent 5506 202f599c92aa
child 31268 63fcde3b5c3b
--- a/jdk/test/java/security/Provider/DefaultPKCS11.java	Thu Jan 12 03:39:37 2012 -0800
+++ b/jdk/test/java/security/Provider/DefaultPKCS11.java	Thu Jan 12 16:04:03 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, 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
@@ -57,7 +57,10 @@
             System.out.println("Test only applies to Solaris 10 and later, skipping");
             return;
         }
-        if (ps[0].getName().equals("SunPKCS11-Solaris") == false) {
+        // SunPKCS11-Solaris provider should be either the first one or
+        // the second one
+        if (ps[0].getName().equals("SunPKCS11-Solaris") == false &&
+            ps[1].getName().equals("SunPKCS11-Solaris") == false) {
             throw new Exception("SunPKCS11-Solaris provider not installed");
         }
         System.out.println("OK");