Smartcard Hotplug?

NIIBE Yutaka gniibe at fsij.org
Wed Nov 4 00:45:15 CET 2015


Hello,

Thank you for your report and I'm sorry I couldn't respond to your
question in gnupg-users, in time.

On 11/04/2015 07:06 AM, Marc Mercer wrote:
> Fedora/Other Linuxes:
> When we use the same setup as above, we get similar results, but with one
> major difference.  On the linux distributions, I have been forced to kill
> the gpg-agent and restart it to force the agent to reload the "replugged"
> card.  Everything else works, except the "hotplug" support.

It should just work with no special configuration.  And it works for
me (at least) on Debian for three years (squeeze, wheezy, jessie,
current sid).

We need more information to figure out what's wrong on in your
environemnt.

Please let me know if you use PC/SC or not.  For GnuPG, there are two
ways to access smartcard; one is through PC/SC service and another is
accessing directly with libusb.

If you have other applications which use PC/SC service, you need to
use PC/SC service.  If not, you can just use smartcard with GnuPG (not
to install PC/SC at all).  For the latter, you need udev configuration
for your smartcard reader.  An example configuration can be seen in the
bug report of Debian:

    https://bugs.debian.org/bug=543217

In my case, it's in /lib/udev/rules.d/60-gnupg.rules
(Similar configuration is done by PC/SC service.)

You can get debug output of scdaemon by configuration of:

============================= .gnupg/scdaemon.conf
debug-level guru
debug-all
log-file /run/user/1000/scd-debug.log
=============================

Please note that it may include your passphrase for smartcard, so be
careful to share the debug output.

(1) With card inserted, invoke gpg --card-status
    Works or not?

(2) Remove the card

(3) With card inserted, again, invoke gpg --card-status
    Works or not?

Please give me your /run/user/1000/scd-debug.log
-- 



More information about the Gnupg-devel mailing list