changeset 9849:125d545184fa

8049250: Need a flag to invert the Card.disconnect(reset) argument Reviewed-by: valeriep
author igerasim
date Tue, 15 Jul 2014 02:00:52 +0400
parents 94f963e35e1c
children be30cb2a3088
files src/share/classes/sun/security/smartcardio/CardImpl.java
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/security/smartcardio/CardImpl.java	Wed Jun 25 12:36:03 2014 -0700
+++ b/src/share/classes/sun/security/smartcardio/CardImpl.java	Tue Jul 15 02:00:52 2014 +0400
@@ -237,7 +237,16 @@
         }
     }
 
+    private static final boolean invertReset =
+        Boolean.parseBoolean(
+            java.security.AccessController.doPrivileged(
+                new sun.security.action.GetPropertyAction(
+                    "sun.security.smartcardio.invertCardReset", "false")));
+
     public void disconnect(boolean reset) throws CardException {
+        if (invertReset) {
+            reset = !reset;
+        }
         if (reset) {
             checkSecurity("reset");
         }