Covadis vega-alpha reader don't support by ccid-driver GnuPG and don't support readers PINPAD used
tux.tsndcb at free.fr
tux.tsndcb at free.fr
Thu Oct 15 11:51:06 CEST 2009
Hi,
I wanted to used the reader's pinpad of my reader (covadis vega-alpha), so I need to use your internal ccid-driver.
Modification has been done on ccid-driver.c, but it dosen(t works pin code is always ask on my desktop and not on the reader and I think your ccid-driver don't support this reader :
Modification in scd/drivers.c :
....
/* We need to know the vendor to do some hacks. */
enum {
VENDOR_CHERRY = 0x046a,
VENDOR_SCM = 0x04e6,
VENDOR_OMNIKEY= 0x076b,
VENDOR_GEMPC = 0x08e6,
VENDOR_KAAN = 0x0d46,
VENDOR_COVADIS= 0x0982
};
....
/* We have only tested a few readers so better don't risk anything
and do not allow the use with other readers. */
switch (handle->id_vendor)
{
case VENDOR_SCM: /* Tested with SPR 532. */
case VENDOR_KAAN: /* Tested with KAAN Advanced (1.02). */
break;
case VENDOR_COVADIS: /* COVADIS Vega-Alpha */
if ( handle->id_product == 0x0008 )
{
break;
}
case VENDOR_CHERRY:
/* The CHERRY XX44 keyboard echos an asterisk for each entered
character on the keyboard channel. We use a special variant
of PC_to_RDR_Secure which directs these characters to the
smart card's bulk-in channel. We also need to append a zero
Lc byte to the APDU. It seems that it will be replaced with
the actual length instead of being appended before the APDU
is send to the card. */
cherry_mode = 1;
break;
default:
return CCID_DRIVER_ERR_NOT_SUPPORTED;
}
....
/* The following is a little endian word. */
msg[15] = pinlen_max; /* wPINMaxExtraDigit-Maximum. */
msg[16] = pinlen_min; /* wPINMaxExtraDigit-Minimum. */
msg[17] = 0x02; /* bEntryValidationCondition:
Validation key pressed */
if (pinlen_min && pinlen_max && pinlen_min == pinlen_max)
msg[17] |= 0x01; /* Max size reached. */
if ( (handle->id_vendor == VENDOR_COVADIS) && (handle->id_product == 0x0008) )
{
msg[18] = 0x01; /* bNumberMessage: 0x01. */
}
else
{
msg[18] = 0xff; /* bNumberMessage: Default. */
}
.....
I used :
debian squeeze
GnuPG 2.0.13
with this scdaemon.conf :
debug 10
debug 2048
debug 3070
debug-ccid-driver
I've this in scdaemon.log :
2009-10-15 11:10:38 scdaemon[6548] handler for fd -1 terminated
2009-10-15 11:10:38 scdaemon[6548] scdaemon (GnuPG) 2.0.13 stopped
2009-10-15 11:11:35 scdaemon[7412] listening on socket `/tmp/gpg-2vLAid/S.scdaemon'
2009-10-15 11:11:35 scdaemon[7412] handler for fd -1 started
2009-10-15 11:11:35 scdaemon[7412] DBG: ccid-driver: using CCID reader 0 (ID=0982:0008:X:0)
2009-10-15 11:11:35 scdaemon[7412] DBG: ccid-driver: idVendor: 0982 idProduct: 0008 bcdDevice: 0100
2009-10-15 11:11:35 scdaemon[7412] DBG: ccid-driver: ChipCard Interface Descriptor:
2009-10-15 11:11:35 scdaemon[7412] DBG: ccid-driver: bLength 54
2009-10-15 11:11:35 scdaemon[7412] DBG: ccid-driver: bDescriptorType 33
2009-10-15 11:11:35 scdaemon[7412] DBG: ccid-driver: bcdCCID 1.00
2009-10-15 11:11:35 scdaemon[7412] DBG: ccid-driver: nMaxSlotIndex 0
2009-10-15 11:11:35 scdaemon[7412] DBG: ccid-driver: bVoltageSupport 7 ?
2009-10-15 11:11:35 scdaemon[7412] DBG: ccid-driver: dwProtocols 3 T=0 T=1
2009-10-15 11:11:35 scdaemon[7412] DBG: ccid-driver: dwDefaultClock 4000
2009-10-15 11:11:35 scdaemon[7412] DBG: ccid-driver: dwMaxiumumClock 4000
2009-10-15 11:11:35 scdaemon[7412] DBG: ccid-driver: bNumClockSupported 0
2009-10-15 11:11:35 scdaemon[7412] DBG: ccid-driver: dwDataRate 10752 bps
2009-10-15 11:11:35 scdaemon[7412] DBG: ccid-driver: dwMaxDataRate 500000 bps
2009-10-15 11:11:35 scdaemon[7412] DBG: ccid-driver: bNumDataRatesSupp. 0
2009-10-15 11:11:35 scdaemon[7412] DBG: ccid-driver: dwMaxIFSD 254
2009-10-15 11:11:35 scdaemon[7412] DBG: ccid-driver: dwSyncProtocols 00000000
2009-10-15 11:11:35 scdaemon[7412] DBG: ccid-driver: dwMechanical 00000000
2009-10-15 11:11:35 scdaemon[7412] DBG: ccid-driver: dwFeatures 00010230
2009-10-15 11:11:35 scdaemon[7412] DBG: ccid-driver: Auto clock change
2009-10-15 11:11:35 scdaemon[7412] DBG: ccid-driver: Auto baud rate change
2009-10-15 11:11:35 scdaemon[7412] DBG: ccid-driver: NAD value other than 0x00 accepted
2009-10-15 11:11:35 scdaemon[7412] DBG: ccid-driver: TPDU level exchange
2009-10-15 11:11:35 scdaemon[7412] DBG: ccid-driver: dwMaxCCIDMsgLen 271
2009-10-15 11:11:35 scdaemon[7412] DBG: ccid-driver: bClassGetResponse 00
2009-10-15 11:11:35 scdaemon[7412] DBG: ccid-driver: bClassEnvelope 00
2009-10-15 11:11:35 scdaemon[7412] DBG: ccid-driver: wlcdLayout none
2009-10-15 11:11:35 scdaemon[7412] DBG: ccid-driver: bPINSupport 3 verification modification
2009-10-15 11:11:35 scdaemon[7412] DBG: ccid-driver: bMaxCCIDBusySlots 1
2009-10-15 11:11:35 scdaemon[7412] DBG: ccid-driver: this drivers requires that the reader supports T=1, TPDU or APDU level exchange and auto configuration - this is not available
2009-10-15 11:11:35 scdaemon[7412] DBG: ccid-driver: device not supported
2009-10-15 11:11:35 scdaemon[7412] reader slot 0: not connected
2009-10-15 11:11:35 scdaemon[7412] slot 0: ATR=3B DA 18 FF 81 B1 FE 75 1F 03 00 31 C5 73 C0 01 40 00 90 00 0C
scdaemon[7412.0] DBG: -> OK GNU Privacy Guard's Smartcard server ready
scdaemon[7412.0] DBG: <- GETINFO socket_name
scdaemon[7412.0] DBG: -> D /tmp/gpg-2vLAid/S.scdaemon
scdaemon[7412.0] DBG: -> OK
scdaemon[7412.0] DBG: <- OPTION event-signal=12
scdaemon[7412.0] DBG: -> OK
scdaemon[7412.0] DBG: <- SERIALNO openpgp
but with this scdaemon.conf
debug 10
debug 2048
debug 3070
debug-ccid-driver
disable-ccid
I've this in the scdaemon.log :
2009-10-15 11:24:33 scdaemon[7900] listening on socket `/tmp/gpg-rpZwiI/S.scdaemon'
2009-10-15 11:24:33 scdaemon[7900] handler for fd -1 started
2009-10-15 11:24:33 scdaemon[7900] reader slot 0: not connected
2009-10-15 11:24:33 scdaemon[7900] slot 0: ATR=3B DA 18 FF 81 B1 FE 75 1F 03 00 31 C5 73 C0 01 40 00 90 00 0C
scdaemon[7900.0] DBG: -> OK GNU Privacy Guard's Smartcard server ready
scdaemon[7900.0] DBG: <- GETINFO socket_name
scdaemon[7900.0] DBG: -> D /tmp/gpg-rpZwiI/S.scdaemon
scdaemon[7900.0] DBG: -> OK
scdaemon[7900.0] DBG: <- OPTION event-signal=12
scdaemon[7900.0] DBG: -> OK
scdaemon[7900.0] DBG: <- SERIALNO openpgp
Could you add this reader in your ccid-driver or could you add IFDHSetProtocolParameters function like as PCSC-lite in ifdhandler.c file ?
Or could you modify ccid_get_atr to support PC/SC readers : ?
Actually :
if (!got_param)
{
/* FIXME: Get those values from the ATR. */
Thanks in advanced for your return.
Best Regards
More information about the Gnupg-devel
mailing list