Skip to content

Commit

Permalink
Fix support of HID Aviator generic
Browse files Browse the repository at this point in the history
This reader firmware is bogus:
- it declares pinpad support but as no keyboard
- it declares short APDU but uses chaining as for extended APDU

Thanks to Martin Paljak for the bug report
#16
  • Loading branch information
LudovicRousseau committed May 9, 2016
1 parent c182936 commit e039760
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/ccid.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,13 @@ int ccid_open_hack_post(unsigned int reader_index)
*/
ccid_descriptor->bPINSupport = 0;
break;
case HID_AVIATOR:
/* The chip advertises pinpad but actually doesn't have one */
ccid_descriptor->bPINSupport = 0;
/* Firmware uses chaining */
ccid_descriptor->dwFeatures &= ~CCID_CLASS_EXCHANGE_MASK;
ccid_descriptor->dwFeatures |= CCID_CLASS_EXTENDED_APDU;
break;

#if 0
/* SCM SCR331-DI contactless */
Expand Down
1 change: 1 addition & 0 deletions src/ccid.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ typedef struct
#define CHERRY_KC1000SC 0x046A00A1
#define ElatecTWN4 0x09D80427
#define SCM_SCL011 0x04E65293
#define HID_AVIATOR 0x076B3A21

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

0 comments on commit e039760

Please sign in to comment.