I have an issue regarding the GPG agent that prevents me from using several commands and particularly the one that enforces the user to touch the key before signing. I am on Debian 8.9 / Linux Mint Debian Edition.
I have struggled to make pgp2 --edit-card
work, but discovered that for reasons unknown to me I had to do it using sudo. I sent the certificates to the key and went on forcing the touch feature for them to work. The issue is that the script that enables that uses the gpg-connect-agent which never wanted to work.
Here’s what I’ve tried so far:
$ > gpg2 --card-edit scdaemon[18891]: PC/SC OPEN failed: unknown PC/SC error code (0x8010002e) scdaemon[18891]: PC/SC OPEN failed: unknown PC/SC error code (0x8010002e) gpg: selecting openpgp failed: Card error gpg: OpenPGP card not available: Card error $ > gpg --card-edit gpg: pcsc_list_readers failed: unknown PC/SC error code (0x8010002e) gpg: card reader not available gpg: OpenPGP card not available: general error $ > sudo gpg --card-edit gpg: WARNING: unsafe ownership on configuration file `/home/user/.gnupg/gpg.conf' Application ID ...: [... bunch of data, card is properly read ...] $ > ls -lahg -rw------- 1 user 9.0K Sep 23 2016 /home/user/.gnupg/gpg.conf // seems ok $ > gpg-connect-agent --hex "scd apdu 00 f1 00 00" /bye gpg-connect-agent: can't connect to the agent: IPC connect call failed $ > pcsc_scan PC/SC device scanner V 1.4.23 (c) 2001-2011, Ludovic Rousseau <ludovic.rousseau@free.fr> Compiled with PC/SC lite version: 1.8.11 Using reader plug'n play mechanism Scanning present readers... Waiting for the first reader...^C // waited ~5m, nothing came up... $ > gpg-agent --daemon GPG_AGENT_INFO=/tmp/gpg-318mlQ/S.gpg-agent:17327:1; export GPG_AGENT_INFO; $ > GPG_AGENT_INFO=/tmp/gpg-318mlQ/S.gpg-agent:17327:1; export GPG_AGENT_INFO; $ > [ ... tried the same gpg-connect-agent && pcsc_scan, same result ] $ > gpg2 --card-edit gpg: selecting openpgp failed: Card error gpg: OpenPGP card not available: Card error
The card itself seems fine since using sudo and gpg –card-edit everything worked, but I have to be able to call gpg-agent as well and the issue I am facing blocks me.
If anyone could help me out on this, I’d be very grateful !