FSIJ USB Token version 2 and Gnuk
NIIBE Yutaka
gniibe at fsij.org
Thu Sep 16 02:19:37 CEST 2010
Hi,
Thanks for testing Gnuk.
The document I read was:
http://www.usb.org/developers/devclass_docs/DWG_Smart-Card_USB-ICC_ICCD_rev10.pdf
I think that this is a subset of CCID specification.
I read it as ICCD implementation allow to implement only
three kinds of interactions.
=====================================================
Section# PC->Target Target->PC
-----------------------------------------------------
6.1.1.1 PC_to_RDR_IccPowerOn RDR_PC_DataBlock
6.1.1.2 PC_to_RDR_IccPowerOff RDR_PC_SlotStatus
6.1.1.3 PC_to_RDR_XfrBlock RDR_PC_DataBlock
-----------------------------------------------------
I don't know how an implementation should behave for unsupported
commands.
Let me think about the handling of unsupported commands. I think
that there is better way than ignoring.
Werner Koch wrote:
> DBG: ccid-driver: PC_to_RDR_GetParameters:
> DBG: ccid-driver: dwLength ..........: 0
> DBG: ccid-driver: bSlot .............: 0
> DBG: ccid-driver: bSeq ..............: 2
> DBG: ccid-driver: [0007] 00 00 00
>
> We sent a GetParameters command to gnuk. This is not implemented and on
> the debug channel we get "ERR03". gnuk puts itsself back into the init
> state and did not sent and error response.
>
> DBG: ccid-driver: usb_bulk_read error: Resource temporarily unavailable
> DBG: ccid-driver: usb_bulk_read error: Resource temporarily unavailable
> DBG: ccid-driver: usb_bulk_read error: Resource temporarily unavailable
> DBG: ccid-driver: usb_bulk_read error: Resource temporarily unavailable
>
> Thus GnuPG's try to read the response fails at the USB level....
Or, it would be easy for Gnuk to just implement GetParameters.
In fact, Gnuk supports more commands, so that it works well with
libccid implementation. Specifically, it supports:
PC_to_RDR_GetSlotStatus RDR_to_PC_SlotStatus
PC_to_RDR_SetParameters RDR_to_PC_Parameters
Besides, it is known that libccid sends CCID class specific request of
GET_DATA_RATES to control pipe (Endpoint 0), which Gnuk ignores.
--
More information about the Gnupg-devel
mailing list