gpg-agent has to be restarted after GnuPG SmartCard pulled from reader
Damien Goutte-Gattat
dgouttegattat at incenp.org
Fri Jan 6 14:52:57 CET 2017
On 01/06/2017 10:06 AM, gnupg-users.dirk at o.banes.ch wrote:
> I was under the impression the OmniKey 3121 is a real reader since it is
> on the how to [1].
For what is worth, I have two such readers, which are working flawlessly
with the ccid driver [1] and with 2048-bit keys. I have not tried them
with the internal driver.
> What would be a good alternative bevore I buy another bad one.
I also have a SCM 3500 reader from SCM Microsystems (now Identiv), again
working flawlessly with the ccid driver.
> p.s. in the meantime a made a script which tails the scdaemon.log and
> waits for "Removal of a card:"
> and then kills the gpg-agent. Not a proper solution - but working so far.
Instead of watching the log, you could use a feature of Scdaemon: if the
file $GNUPGHOME/scd-event exists and is executable, it will be called on
every card reader status change.
For example, to act upon card removal, you could have the following:
#!/bin/sh
case "$8" in
NOCARD)
# do something
;;
esac
See doc/examples/scd-event in GnuPG's source for more details of what
this script can do.
Damien
[1] http://pcsclite.alioth.debian.org/ccid.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: </pipermail/attachments/20170106/f9b07821/attachment.sig>
More information about the Gnupg-users
mailing list