Patch for scdaemon and reader/smartcard combo devices

Grant Olson kgo at grant-olson.net
Fri Jan 21 04:59:30 CET 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01/20/2011 09:52 PM, NIIBE Yutaka wrote:
> 
>   * signing once, removing the card, attempting to sign, inserting the
>     card, and signing again
> 
> doesn't work well.  The log of scdaemon is:
> 
> ...
> 
> So, I added:
> 
> diff --git a/scd/apdu.c b/scd/apdu.c
> index 1bdc673..458bcdd 100644
> --- a/scd/apdu.c
> +++ b/scd/apdu.c
> @@ -1416,7 +1416,8 @@ reset_pcsc_reader_wrapped (int slot)
>        /* If the error code is no smart card or no reader, we should not consider
>           this a major error and close the wrapper.  */
>        sw = pcsc_error_to_sw (err);
> -      if (err == PCSC_E_NO_SMARTCARD || err == PCSC_E_UNKNOWN_READER)
> +      if (err == PCSC_E_NO_SMARTCARD || err == PCSC_E_UNKNOWN_READER
> +	  || err == PCSC_E_INVALID_VALUE)
>          return sw;
>        goto command_failed;
>      }
> 
> Then,
> 
>   * signing once, removing the card, attempting to sign, inserting the
>     card, and signing again
> 
> works fine too.

Thanks.  I'm not having that problem, but I'll add that patch locally to
make sure it doesn't break anything on my config.

So far for me, Ubuntu has been working flawlessly.

OSX is a little flaky.  It works, but as long at the card isn't
unplugged for more than 2-1/2 minutes.  That's better than before.  I
think the original patch uncovered another problem,  I don't think it
introduced an error.  But anyway I'll try to get that issue resolved here.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNOQSYAAoJEP5F5V2hilTWp6wH/0I27D/azOeahnDie2+4YE0A
PIR0R3fMV9sEwH8ugr8JN4bjvdgdf9AvqSWQ6u3geud3MJXTLmpYxpUvkQXtDP3A
vBKouUMrH9MpiI1JuffkEGQcO1mX3iOsQFQnXV7GSkSBs3JQKu8I+JepW38IXdBa
vtvOBQ4x1pMk82/GyiUDpGLaXcHvoLA7/VdJfX7JsDR5TGzE9s+WqE9TkW8qdxJv
9HTTkUd5igDUFlRB7kzPDQQr9gaRut9EZyBfNFNDSWIYu1tksuP5hb8En1VbZ1Yg
HuvwBz0vTtVKbwlfU+NGtVnmZ877+h3W/aEcvWCFeb0LUv/59yRekhEEr/AHGtU=
=/WWG
-----END PGP SIGNATURE-----



More information about the Gnupg-devel mailing list