Patch for scdaemon and reader/smartcard combo devices
NIIBE Yutaka
gniibe at fsij.org
Fri Jan 21 04:56:34 CET 2011
2011-01-21 10:09, Grant Olson wrote:
> @@ -1412,10 +1413,10 @@ reset_pcsc_reader_wrapped (int slot)
> {
> log_error ("PC/SC RESET failed: %s (0x%lx)\n",
> pcsc_error_string (err), err);
> - /* If the error code is no smart card, we should not considere
> + /* If the error code is no smart card or no reader, we should not
> conside
> this a major error and close the wrapper. */
> sw = pcsc_error_to_sw (err);
> - if (err == PCSC_E_NO_SMARTCARD)
> + if (err == PCSC_E_NO_SMARTCARD || err == PCSC_E_UNKNOWN_READER)
> return sw;
> goto command_failed;
> }
It seems that I have found an issue for this change.
Today, I need to test two Gnuk Tokens, and I tried your patched version
of scdaemon. The tokens are:
(A) STM8S Discovery Kit
(B) CQ STARM
When I insert (A) and use it, then remove it and insert (B).
It doesn't work. Here is the log of scdaemon:
--------------------
2011-01-21 12:41:52 scdaemon[11689] PC/SC RESET failed: unknown reader (0x80100009)
2011-01-21 12:41:52 scdaemon[11689] DBG: send apdu: c=00 i=A4 p1=00 p2=0C lc=2 le=-1 em=0
2011-01-21 12:41:52 scdaemon[11689] PC/SC RESET failed: unknown reader (0x80100009)
2011-01-21 12:41:52 scdaemon[11689] apdu_send_simple(0) failed: no reader
--------------------
Removing (B) and inserting (A) again, it works.
But I have no way to use (B) any more without killing scdaemon, and leting gpg-agent
learn for (B) to use (B). But this time, I have no way to use back to (A)...
--
More information about the Gnupg-devel
mailing list