gpg and smartcard on ubuntu 16.04

NIIBE Yutaka gniibe at fsij.org
Thu Apr 28 02:23:16 CEST 2016


On 04/28/2016 06:02 AM, Richard Ulrich wrote:
> I use the stock versions from the ubuntu 16.04 repository:
> gnupg  1.4.20-1ubuntu3
> gnupg2 2.1.11-6ubuntu2
> gnupg-agent 2.1.11-6ubuntu2
> scdaemon 2.1.11-6ubuntu2

Good, Ubuntu has GnuPG 2.1 (eventually, gpg will be GnuPG 2.1).  Out
of curiosity, does it has libgcrypt 1.7.0?

> Now if I want to decrypt a file:
>
> gpg -d Dokumente/somefile.txt.gpg
> gpg: Anonymer Empfänger; Versuch mit geheimem Schlüssel 0AAAAAAA …
> gpg: pcsc_list_readers failed: unknown PC/SC error code (0x8010002e)
> gpg: Kartenleser ist nicht vorhanden
>
> gpg --use-agent -d Dokumente/somefile.txt.gpg
> gpg: Anonymer Empfänger;
> Versuch mit geheimem Schlüssel 0AAAAAAA …
> gpg: pcsc_list_readers failed:
> unknown PC/SC error code (0x8010002e)
> gpg: Kartenleser ist nicht
> vorhanden

I think that this is the issue of GPG_AGENT_INFO variable, which was
used before 2.1.

How about set those environment variables, like?

     export GPG_AGENT_INFO=$HOME/.gnupg/S.gpg-agent:0:1
     export SSH_AUTH_SOCK=$HOME/S.gpg-agent.ssh

After setting those variables, does gpg work correctly?

In my environment of Debian, those variables are set by:
/etc/X11/Xsession.d/90gpg-agent
-- 



More information about the Gnupg-users mailing list