[Pcsclite-cvs-commit] r6790 - trunk/Drivers/ccid/src
ludovic.rousseau at free.fr
ludovic.rousseau at free.fr
Mon Nov 25 10:02:35 UTC 2013
Author: rousseau
Date: 2013-11-25 10:02:35 +0000 (Mon, 25 Nov 2013)
New Revision: 6790
Modified:
trunk/Drivers/ccid/src/ifdhandler.c
Log:
IFDHControl(): report FEATURE_IFD_PIN_PROPERTIES only for pinpad readers
Some (bogus) applications use the presence of FEATURE_IFD_PIN_PROPERTIES
to know if the reader is a pinpad reader or not.
The application should use FEATURE_VERIFY_PIN_DIRECT and
FEATURE_MODIFY_PIN_DIRECT instead.
Reporting FEATURE_IFD_PIN_PROPERTIES for a non-pinpad reader is useless
so it should not harm to remove it from CM_IOCTL_GET_FEATURE_REQUEST.
Modified: trunk/Drivers/ccid/src/ifdhandler.c
===================================================================
--- trunk/Drivers/ccid/src/ifdhandler.c 2013-11-22 08:27:48 UTC (rev 6789)
+++ trunk/Drivers/ccid/src/ifdhandler.c 2013-11-25 10:02:35 UTC (rev 6790)
@@ -1441,13 +1441,16 @@
iBytesReturned += sizeof(PCSC_TLV_STRUCTURE);
}
- /* We can always forward wLcdLayout */
- pcsc_tlv -> tag = FEATURE_IFD_PIN_PROPERTIES;
- pcsc_tlv -> length = 0x04; /* always 0x04 */
- pcsc_tlv -> value = htonl(IOCTL_FEATURE_IFD_PIN_PROPERTIES);
+ /* Provide IFD_PIN_PROPERTIES only for pinpad readers */
+ if (ccid_descriptor -> bPINSupport)
+ {
+ pcsc_tlv -> tag = FEATURE_IFD_PIN_PROPERTIES;
+ pcsc_tlv -> length = 0x04; /* always 0x04 */
+ pcsc_tlv -> value = htonl(IOCTL_FEATURE_IFD_PIN_PROPERTIES);
- pcsc_tlv++;
- iBytesReturned += sizeof(PCSC_TLV_STRUCTURE);
+ pcsc_tlv++;
+ iBytesReturned += sizeof(PCSC_TLV_STRUCTURE);
+ }
if ((KOBIL_TRIBANK == readerID)
|| (KOBIL_MIDENTITY_VISUAL == readerID))
More information about the Pcsclite-cvs-commit
mailing list