1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-23 10:29:58 +01:00

SCD: Add support of Covadis VEGA_ALPHA reader.

* scd/ccid-driver.c: Add 2013.
(VENDER_VEGA, VEGA_ALPHA):New.
(ccid_transceive_secure): VEGA_ALPHA is same firmware as GEMPC_PINPAD.
Change bNumberMessage to 0x01, as it works better (was: 0xff).
This commit is contained in:
NIIBE Yutaka 2013-01-10 10:49:27 +09:00
parent 15bf5a10d4
commit daafc1c8fd

View File

@ -1,6 +1,6 @@
/* ccid-driver.c - USB ChipCardInterfaceDevices driver
* Copyright (C) 2003, 2004, 2005, 2006, 2007
* 2008, 2009 Free Software Foundation, Inc.
* 2008, 2009, 2013 Free Software Foundation, Inc.
* Written by Werner Koch.
*
* This file is part of GnuPG.
@ -211,6 +211,7 @@ enum {
VENDOR_SCM = 0x04e6,
VENDOR_OMNIKEY= 0x076b,
VENDOR_GEMPC = 0x08e6,
VENDER_VEGA = 0x0982,
VENDOR_KAAN = 0x0d46,
VENDOR_FSIJ = 0x234b,
VENDOR_VASCO = 0x1a44
@ -225,6 +226,7 @@ enum {
#define CHERRY_ST2000 0x003e
#define VASCO_920 0x0920
#define GEMPC_PINPAD 0x3478
#define VEGA_ALPHA 0x0008
/* A list and a table with special transport descriptions. */
enum {
@ -3361,16 +3363,17 @@ ccid_transceive_secure (ccid_driver_t handle,
if (handle->id_product != CHERRY_ST2000)
cherry_mode = 1;
break;
case VENDOR_GEMPC:
if (handle->id_product == GEMPC_PINPAD)
default:
if ((handle->id_vendor == VENDOR_GEMPC &&
handle->id_product == GEMPC_PINPAD)
|| (handle->id_vendor == VENDOR_VEGA &&
handle->id_product == VEGA_ALPHA))
{
enable_varlen = 0;
pininfo->minlen = 4;
pininfo->maxlen = 8;
break;
}
/* fall through */
default:
return CCID_DRIVER_ERR_NOT_SUPPORTED;
}
@ -3446,7 +3449,7 @@ ccid_transceive_secure (ccid_driver_t handle,
msglen++;
if (apdu_buf[1] == 0x20)
msg[msglen++] = 0xff; /* bNumberMessage: Default. */
msg[msglen++] = 0x01; /* bNumberMessage. */
else
msg[msglen++] = 0x03; /* bNumberMessage. */