2010/6/4 Ludovic Rousseau <[email protected]>: > 2010/6/4 Martin Paljak <[email protected]>: >> Hello, >> >> On Jun 4, 2010, at 16:39 , Ludovic Rousseau wrote: >> >>> As usual, report any bug. Thanks >> >>> 4 June 2010 >>> - SCardControl(): do not check for card events since we are talking to >>> the reader not the card. A smart card removal should not make >>> SCardControl() fail with SCARD_W_REMOVED_CARD >> I'm not sure but I recall a similar comment before. >> >> >> Will SCardControl result in a SCARD_E_NOT_TRANSACTED if the card is removed? > > If the driver reports an error yes (should be).
I checked with a GemPC pinpad and my sample program ccid/examples/scardcontrol If I removed the card when the pin is asked on the pinpad I get: 00000034 -> 000000 69 21 00 00 00 00 24 00 00 00 01 00 82 04 00 00 04 08 04 03 02 03 04 09 00 00 00 00 40 0D 00 24 00 00 08 30 30 30 30 30 30 30 30 card removed here 02088569 <- 000000 80 00 00 00 00 00 24 82 01 00 00000025 commands.c:1347:CCID_Receive() Time extension requested: 0x01 03010730 <- 000000 80 00 00 00 00 00 24 42 FE 00 00000029 commands.c:1318:CCID_Receive Card absent or mute 00000013 Control RxBuffer: 00000013 ifdwrapper.c:644:IFDControl() Card not transacted: 612 When the card is removed the driver gets a "Time extension request" and an error message is displayed on the pinpad reader. After 1 or 2 seconds the error message disappears and the error "Card absent or mute" is returned to the driver. The application then gets a Transaction failed. (0x80100016) error. So yes, the application gets a SCARD_E_NOT_TRANSACTED if the reader reports an error when the card is removed. >> I don't know what the reference implementation does (Windows) but for >> IOCTL-s that are known to talk to the card eventually (PIN entry related) >> I'd expect SCardControl to behave somewhat like SCardTransmit (which means >> giving card state related status codes) > > Good point. I will have to check. SCardControl() does not know what commands are for the reader only and what commands involve the card. I do not see how I could return a SCARD_W_REMOVED_CARD instead of SCARD_E_NOT_TRANSACTED. Bye -- Dr. Ludovic Rousseau _______________________________________________ Muscle mailing list [email protected] http://lists.drizzle.com/mailman/listinfo/muscle
