[389-commits] coolkey/applet/src/com/redhat/ckey/applet CardEdge.java, 1.4.2.2, 1.4.2.3

Jack Magne jmagne at fedoraproject.org
Thu Jan 20 18:13:11 UTC 2011


Author: jmagne

Update of /cvs/dirsec/coolkey/applet/src/com/redhat/ckey/applet
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv19281

Modified Files:
      Tag: COOLKEY_330J_BRANCH
	CardEdge.java 
Log Message:
Fix Bugzilla  Bug 614639 - 64k gemalto usb token no longer works properly after a logout request is issued.


Index: CardEdge.java
===================================================================
RCS file: /cvs/dirsec/coolkey/applet/src/com/redhat/ckey/applet/CardEdge.java,v
retrieving revision 1.4.2.2
retrieving revision 1.4.2.3
diff -u -r1.4.2.2 -r1.4.2.3
--- CardEdge.java	19 Feb 2009 02:06:31 -0000	1.4.2.2
+++ CardEdge.java	20 Jan 2011 18:13:07 -0000	1.4.2.3
@@ -123,8 +123,8 @@
     private static final byte VERSION_PROTOCOL_MINOR = 1;
     private static final byte VERSION_APPLET_MAJOR = 1;
     private static final byte VERSION_APPLET_MINOR = 4;
-    private static final short BUILDID_MAJOR = (short) 0x498f;
-    private static final short BUILDID_MINOR = (short) 0xa85f;
+    private static final short BUILDID_MAJOR = (short) 0x4d38;
+    private static final short BUILDID_MINOR = (short) 0x7a28;
     private static final short ZEROS = 0;
 
     // * Enable pin size check
@@ -1935,16 +1935,18 @@
 
     private void Logout(APDU apdu, byte[] buffer) 
     {
-	byte lc = buffer[ISO7816.OFFSET_LC];
-	if( lc != 0 )
-	    ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
+        //Disable exceptions below to appease Gemalto 64K USB key
+	//byte lc = buffer[ISO7816.OFFSET_LC];
+	//if( lc != 0 )
+	//    ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
 
 	byte logoutID = buffer[ISO7816.OFFSET_P1];
 	
 
-	if ((authenticated_id & (short)(1 << logoutID)) == 0) {
-	    ISOException.throwIt(SW_UNAUTHORIZED);
-	}
+       //if ((authenticated_id & (short)(1 << logoutID)) == 0) {
+       //    ISOException.throwIt(SW_UNAUTHORIZED);
+       //}
+
 	LogoutOneIdentity(logoutID);
     }
 
@@ -2791,7 +2793,7 @@
 	case INS_DELETE_OBJ:
 	case INS_READ_OBJ:
 	case INS_WRITE_OBJ:
-	case INS_LOGOUT:
+//	case INS_LOGOUT:
 	    ret = true;
 	}
 	return ret;
@@ -2828,7 +2830,7 @@
 	if (requireAuth(ins)) {
 	    verifySecureNonce(apdu, buffer);
 	}
- 
+
 	switch(ins)
 	{
 	case INS_IMPORT_KEY:



More information about the 389-commits mailing list