Check-in [45212cc4ca]
Overview
Comment:Updated to treat a request of read of 0 bytes as a no-op.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:45212cc4caa863dce35ea6ecad4b879ce5916c86
User & Date: rkeene on 2010-05-17 19:53:33
Other Links: manifest | tags
Context
2010-05-17
20:20
Updated to not set "Le" when asking to sign/decrypt (discovered from ActivClient APDU dump)

Reverted last commit where reads of 0 bytes were converted to no-ops check-in: f276873873 user: rkeene tags: trunk

19:53
Updated to treat a request of read of 0 bytes as a no-op. check-in: 45212cc4ca user: rkeene tags: trunk
19:43
Fixed issues with padding check-in: 66507306f5 user: rkeene tags: trunk
Changes

Modified cackey.c from [64d4505a46] to [84da4e7494].

  1160   1160   			CACKEY_DEBUG_PRINTF("Throwing away %lu bytes, nowhere to put them!", (unsigned long) recv_len);
  1161   1161   		}
  1162   1162   	}
  1163   1163   
  1164   1164   	if (major_rc == 0x61) {
  1165   1165   		/* We need to READ */
  1166   1166   		CACKEY_DEBUG_PRINTF("Buffer read required");
         1167  +
         1168  +		if (minor_rc == 0x00) {
         1169  +			CACKEY_DEBUG_PRINTF("Read of 0 bytes is a no-op, returning in success.");
         1170  +
         1171  +			return(CACKEY_PCSC_S_OK);
         1172  +		}
  1167   1173   
  1168   1174   		pcsc_getresp_ret = cackey_send_apdu(slot, GSCIS_CLASS_ISO7816, GSCIS_INSTR_GET_RESPONSE, 0x00, 0x00, 0, NULL, minor_rc, respcode, respdata, &tmp_respdata_len);
  1169   1175   		if (pcsc_getresp_ret != CACKEY_PCSC_S_OK) {
  1170   1176   			CACKEY_DEBUG_PRINTF("Buffer read failed!  Returning in failure");
  1171   1177   
  1172   1178   			/* End Smartcard Transaction */
  1173   1179   			cackey_end_transaction(slot);