Commit 3b29cc5a authored by Ludovic Rousseau's avatar Ludovic Rousseau
Browse files

Fix non-pinpad HID global devices

The HID Aviator is not the only reader that declares pinpad support in
the USB descriptor but that has no physical keyboard to enter a PIN.
The USB descriptor is bogus.

The readers also support Extended APDU even if they declare Short APDU.

Bogus readers are:
- OMNIKEY Generic
- OMNIKEY 3121 or 3021 or 1021
- OMNIKEY 6121
- Cherry Smart Terminal xx44
- Fujitsu Smartcard Reader D323

Thanks to hidglobal.com for the patch.
parent 10fd29a3
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -486,7 +486,12 @@ int ccid_open_hack_post(unsigned int reader_index)
			 */
			ccid_descriptor->bPINSupport = 0;
			break;
		case HID_AVIATOR:

		case HID_AVIATOR:      /* OMNIKEY Generic */
		case HID_OMNIKEY_3X21: /* OMNIKEY 3121 or 3021 or 1021 */
		case HID_OMNIKEY_6121: /* OMNIKEY 6121 */
		case CHERRY_XX44:      /* Cherry Smart Terminal xx44 */
		case FUJITSU_D323:     /* Fujitsu Smartcard Reader D323 */
			/* The chip advertises pinpad but actually doesn't have one */
			ccid_descriptor->bPINSupport = 0;
			/* Firmware uses chaining */
+4 −0
Original line number Diff line number Diff line
@@ -223,6 +223,10 @@ typedef struct
#define SCM_SCL011 0x04E65293
#define HID_AVIATOR	0x076B3A21
#define HID_OMNIKEY_5422 0x076B5422
#define HID_OMNIKEY_3X21 0x076B3031 /* OMNIKEY 3121 or 3021 or 1021 */
#define HID_OMNIKEY_6121 0x076B6632 /* OMNIKEY 6121 */
#define CHERRY_XX44	0x046A00A7 /* Cherry Smart Terminal xx44 */
#define FUJITSU_D323 0x0BF81024 /* Fujitsu Smartcard Reader D323 */

#define VENDOR_GEMALTO 0x08E6
#define GET_VENDOR(readerID) ((readerID >> 16) & 0xFFFF)