From 967d3649d24aba623133808e8d01675dff389fbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Kereste=C5=A1?= Date: Tue, 17 Jul 2018 17:11:42 +0200 Subject: [PATCH] scd: Add support for Trustica Cryptoucan. --- scd/apdu.c | 6 ++++-- scd/ccid-driver.c | 6 ++++++ scd/ccid-driver.h | 4 +++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/scd/apdu.c b/scd/apdu.c index 66a16f820..ce7f41f61 100644 --- a/scd/apdu.c +++ b/scd/apdu.c @@ -965,7 +965,8 @@ pcsc_vendor_specific_init (int slot) else if (strstr (reader_table[slot].rdrname, "cyberJack") || strstr (reader_table[slot].rdrname, "DIGIPASS") || strstr (reader_table[slot].rdrname, "Gnuk") - || strstr (reader_table[slot].rdrname, "KAAN")) + || strstr (reader_table[slot].rdrname, "KAAN") + || strstr (reader_table[slot].rdrname, "Trustica")) reader_table[slot].pinpad_varlen_supported = 1; } @@ -1039,7 +1040,8 @@ pcsc_vendor_specific_init (int slot) else if (vendor == 0x0c4b /* Tested with Reiner cyberJack GO */ || vendor == 0x1a44 /* Tested with Vasco DIGIPASS 920 */ || vendor == 0x234b /* Tested with FSIJ Gnuk Token */ - || vendor == 0x0d46 /* Tested with KAAN Advanced??? */) + || vendor == 0x0d46 /* Tested with KAAN Advanced??? */ + || (vendor == 0x1fc9 && product == 0x81e6) /* Tested with Trustica Cryptoucan */) reader_table[slot].pinpad_varlen_supported = 1; return 0; diff --git a/scd/ccid-driver.c b/scd/ccid-driver.c index f33a36c83..ae40f0118 100644 --- a/scd/ccid-driver.c +++ b/scd/ccid-driver.c @@ -3387,6 +3387,12 @@ ccid_transceive_secure (ccid_driver_t handle, if (handle->id_product != CHERRY_ST2000) cherry_mode = 1; break; + case VENDOR_NXP: + if (handle->id_product == CRYPTOUCAN){ + pininfo->maxlen = 25; + enable_varlen = 1; + } + break; default: if ((handle->id_vendor == VENDOR_GEMPC && handle->id_product == GEMPC_PINPAD) diff --git a/scd/ccid-driver.h b/scd/ccid-driver.h index b6da30c07..c31c25fa7 100644 --- a/scd/ccid-driver.h +++ b/scd/ccid-driver.h @@ -68,7 +68,8 @@ enum { VENDOR_REINER = 0x0c4b, VENDOR_KAAN = 0x0d46, VENDOR_FSIJ = 0x234b, - VENDOR_VASCO = 0x1a44 + VENDOR_VASCO = 0x1a44, + VENDOR_NXP = 0x1fc9, }; @@ -84,6 +85,7 @@ enum { #define GEMPC_CT30 0x3437 #define VEGA_ALPHA 0x0008 #define CYBERJACK_GO 0x0504 +#define CRYPTOUCAN 0x81e6 #endif /*CCID_DRIVER_INCLUDE_USB_IDS*/