Check-in [7272e3d08a]
Overview
SHA1:7272e3d08ae12bb5ae860d195adf2cd4d2f86596
Date: 2016-02-26 18:36:58
User: rkeene
Comment:Added additional debugging information for SCardTransmit() being done successfully
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2016-02-26
18:42
[bf8001bc42] Updated to workaround a bug in Google's PCSC implementation where SCardStatus() requires a reader parameter (user: rkeene, tags: trunk)
18:36
[7272e3d08a] Added additional debugging information for SCardTransmit() being done successfully (user: rkeene, tags: trunk)
18:36
[dc38d00e61] Updated to supply a pioRecvPci parameter to SCardTransmit(), needed by Google's PCSC implementation (user: rkeene, tags: trunk)
Changes

Modified cackey.c from [36cd71f6ea] to [bf13559221].

1589
1590
1591
1592
1593
1594
1595


1596
1597
1598
1599
1600
1601
1602
	} else {
		CACKEY_DEBUG_PRINTBUF("Sending APDU:", xmit_buf, xmit_len);
	}

	recv_len = sizeof(recv_buf);
	memcpy(&pioRecvPci, pioSendPci, sizeof(pioRecvPci));
	scard_xmit_ret = SCardTransmit(slot->pcsc_card, pioSendPci, xmit_buf, xmit_len, &pioRecvPci, recv_buf, &recv_len);



	if (scard_xmit_ret == SCARD_E_NOT_TRANSACTED) {
		CACKEY_DEBUG_PRINTF("Failed to send APDU to card (SCardTransmit() = %s/%lx), will ask calling function to retry (not resetting card)...", CACKEY_DEBUG_FUNC_SCARDERR_TO_STR(scard_xmit_ret), (unsigned long) scard_xmit_ret);

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








>
>







1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
	} else {
		CACKEY_DEBUG_PRINTBUF("Sending APDU:", xmit_buf, xmit_len);
	}

	recv_len = sizeof(recv_buf);
	memcpy(&pioRecvPci, pioSendPci, sizeof(pioRecvPci));
	scard_xmit_ret = SCardTransmit(slot->pcsc_card, pioSendPci, xmit_buf, xmit_len, &pioRecvPci, recv_buf, &recv_len);

	CACKEY_DEBUG_PRINTF("SCardTransmit() completed with value: %s/%lx", CACKEY_DEBUG_FUNC_SCARDERR_TO_STR(scard_xmit_ret), (unsigned long) scard_xmit_ret);

	if (scard_xmit_ret == SCARD_E_NOT_TRANSACTED) {
		CACKEY_DEBUG_PRINTF("Failed to send APDU to card (SCardTransmit() = %s/%lx), will ask calling function to retry (not resetting card)...", CACKEY_DEBUG_FUNC_SCARDERR_TO_STR(scard_xmit_ret), (unsigned long) scard_xmit_ret);

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