[Pcsclite-git-commit] [CCID] 02/02: CmdXfrBlockCHAR_T0: returns an error when needed

Ludovic Rousseau rousseau at moszumanska.debian.org
Tue Jun 28 16:26:48 UTC 2016


This is an automated email from the git hooks/post-receive script.

rousseau pushed a commit to branch master
in repository CCID.

commit 05e86c6d5ac7db2cc5a184a52d33b403575c848e
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date:   Tue Jun 28 15:28:37 2016 +0200

    CmdXfrBlockCHAR_T0: returns an error when needed
    
    If an "Unrecognized Procedure byte" is found then the driver returns
    with the error IFD_COMMUNICATION_ERROR instead of no error.
    
    Example of problematic trace with a "KEBTechnology KONA USB SmartCard":
    
    00000018 winscard.c:1618:SCardTransmit() Send Protocol: T=0
    00000016 APDU: 00 00 00 00
    00000015 ifdhandler.c:1295:IFDHTransmitToICC() usb:04cc/5072:libudev:0:/dev/bus/usb/003/073 (lun: 0)
    00000024 commands.c:1997:CmdXfrBlockCHAR_T0() T=0: 4 bytes
    00000015 commands.c:1324:CCID_Transmit() chain parameter: 1
    00000014 ccid_usb.c:1191:ControlUSB() request: 0x65
    00000014 send: 00 00 00 00 00
    00000926 ccid_usb.c:1191:ControlUSB() request: 0x6F
    00000724 receive: 00 00
    00000036 commands.c:2192:CmdXfrBlockCHAR_T0() Unrecognized Procedure byte (0x24) found!
    00000016 SW:
    00000013 winscard.c:1663:SCardTransmit() UnrefReader() count was: 2
---
 src/commands.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/commands.c b/src/commands.c
index 7e42cf5..c6cd40a 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -2190,6 +2190,7 @@ static RESPONSECODE CmdXfrBlockCHAR_T0(unsigned int reader_index,
 
 		/* Error, unrecognized situation found */
 		DEBUG_CRITICAL2("Unrecognized Procedure byte (0x%02X) found!", *in_buf);
+		return_value = IFD_COMMUNICATION_ERROR;
 		return return_value;
 	}
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pcsclite/CCID.git



More information about the Pcsclite-cvs-commit mailing list