Andreas Schwier
Thu, 02 Aug 2001 00:22:05 -0700
> In the perfect world yes ! but, sadly, people sometimes doesn't follow > correctly the ISO7816 or misunderstood it. I have cards (W4SC as an > example) which send back a GET RESPONSE even for a APDU without data. > This is really annoying as I have to modify my application to take care > of this kind of cards. That is because there is no way for the card to differentiate between a case 3 and case 4 APDU. Independent of whether the application specifies Le or not, the command is always send to the card with P3 = Lc. It is the transport layer T=0, that must detect a Le passed from the application and enable GET RESPONSE processing. On the application level case 1 to case 4 look like Case 1: CLA INS P1 P2 Case 2: CLA INS P1 P2 Le Case 3: CLA INS P1 P2 Lc Data Case 4: CLA INS P1 P2 Lc Data Le In T=1 these APDUs are transported transparently. In T=0 they are mapped to Case 1: CLA INS P1 P2 P3 = 00 Case 2: CLA INS P1 P2 P3=Le Case 3: CLA INS P1 P2 P3=Lc Data Case 4: CLA INS P1 P2 P3=Lc Data and subsequent GET RESPONSE. Andreas *************************************************************** Unix Smart Card Developers - M.U.S.C.L.E. (Movement for the Use of Smart Cards in a Linux Environment) http://www.linuxnet.com/ To unsubscribe send an email to [EMAIL PROTECTED] with unsubscribe sclinux ***************************************************************