changeset 8270:e4c897b33cb7

8009438: sun/security/pkcs11/Secmod tests failing on Ubuntu 12.04 Reviewed-by: vinnie
author ascarpino
date Mon, 02 Sep 2013 09:52:08 -0700
parents 2434e79fc41f
children b4c259743371
files src/share/classes/sun/security/pkcs11/Secmod.java
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/security/pkcs11/Secmod.java	Wed Sep 18 14:57:29 2013 -0700
+++ b/src/share/classes/sun/security/pkcs11/Secmod.java	Mon Sep 02 09:52:08 2013 -0700
@@ -756,8 +756,12 @@
             if (DEBUG) System.out.println("handles: " + handles.length);
 
             for (long handle : handles) {
-                TrustAttributes trust = new TrustAttributes(token, session, handle);
-                trustMap.put(trust.getHash(), trust);
+                try {
+                    TrustAttributes trust = new TrustAttributes(token, session, handle);
+                    trustMap.put(trust.getHash(), trust);
+                } catch (PKCS11Exception e) {
+                    // skip put on pkcs11 error
+                }
             }
         } finally {
             token.releaseSession(session);