changeset 9739:baec3649f6c0

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 86160b07b1db
children 8a5661948eb8
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	Mon Jul 14 13:54:46 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");
         }