Openpgp card handling depending on manufacturer?

NIIBE Yutaka gniibe at
Mon Nov 5 09:46:31 CET 2012

On 2012-11-05 at 08:34 +0100, Klaus Flittner wrote:
> The only difference between the working and non-working case is the
> manufacturer value. And as far is i understand the only software in the
> chain (reader firmware, libccid, pcsc, gpg) that uses this value or
> even now about it is gpg.

I'd understand your theory.  Note that it is also possible the bug were
not related to your change of manufacturer value.

Are you sure that the error is by timeout?  Did you see
libusb_block_transfer really returns ETIMEOUT?

If your smartcard reader is supported by GnuPG's in-stock CCID driver,
it is also worth a try with no pcsc and libccid.

			*	*	*

Let me explain one example around CCID library and GnuPG.  I was in
chase of a bug.  I changed some code in GnuPG and watched a change of
behavior, I assumed that I enbugged in GnuPG... but the bug was in
libusb, actually.

That was with Debian, with ccid 1.4.2 and libusb 2:1.0.8-2.

The library ccid has a buffer (64KiB) and sends four URBs, and there
was a race condition between sending another URB and receiving a reply
packet.  I found the fix in libusb 1.0.9, which handles EROMOTEIO

More information about the Gnupg-devel mailing list