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
1161
1162
1163
1164
1165
1166






1167
1168
1169
1170
1171
1172
1173
			CACKEY_DEBUG_PRINTF("Throwing away %lu bytes, nowhere to put them!", (unsigned long) recv_len);
		}
	}

	if (major_rc == 0x61) {
		/* We need to READ */
		CACKEY_DEBUG_PRINTF("Buffer read required");







		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);
		if (pcsc_getresp_ret != CACKEY_PCSC_S_OK) {
			CACKEY_DEBUG_PRINTF("Buffer read failed!  Returning in failure");

			/* End Smartcard Transaction */
			cackey_end_transaction(slot);







>
>
>
>
>
>







1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
			CACKEY_DEBUG_PRINTF("Throwing away %lu bytes, nowhere to put them!", (unsigned long) recv_len);
		}
	}

	if (major_rc == 0x61) {
		/* We need to READ */
		CACKEY_DEBUG_PRINTF("Buffer read required");

		if (minor_rc == 0x00) {
			CACKEY_DEBUG_PRINTF("Read of 0 bytes is a no-op, returning in success.");

			return(CACKEY_PCSC_S_OK);
		}

		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);
		if (pcsc_getresp_ret != CACKEY_PCSC_S_OK) {
			CACKEY_DEBUG_PRINTF("Buffer read failed!  Returning in failure");

			/* End Smartcard Transaction */
			cackey_end_transaction(slot);