It takes 8-9 secs until pinentry asks for the PIN of the OpenPGP card

NIIBE Yutaka gniibe at fsij.org
Fri May 17 06:39:55 CEST 2024


Hello,

Matthias Apitz <guru at unixarea.de> wrote:
> This isn't that easy. The pcscd is running (when needed) as:
>
> purism at pureos:~$ ps ax | grep pcscd
>    2151 ?        Ssl    0:00 /usr/sbin/pcscd --foreground --auto-exit
>
> it is launched by a system service:

I see.  IIUC, PureOS is Debian based.  There should be a file for systemd
as /lib/systemd/system/pcscd.service. Its content is something like:
==========================
[Unit]
Description=PC/SC Smart Card Daemon
Requires=pcscd.socket
Documentation=man:pcscd(8)

[Service]
ExecStart=/usr/sbin/pcscd --foreground --auto-exit $PCSCD_ARGS
ExecReload=/usr/sbin/pcscd --hotplug
EnvironmentFile=-/etc/default/pcscd

[Install]
Also=pcscd.socket
==========================

Then, to debug PC/SC service, you can have a file /etc/default/pcscd with:
==========================
PCSCD_ARGS=--debug
LIBCCID_ifdLogLevel=0xffff
==========================

Kill pcscd by systemctl, if any.

Kill the scdaemon by:

    $ gpgconf --kill scdaemon

And then, when you try to access OpenPGP card by SSH or GnuPG, gpg-agent
invokes scdaemon, scdaemon tries to access PC/SC service, pcscd is
invoked by socket activation with systemd.  You can see the debug log
by journalctl.
-- 



More information about the Gnupg-users mailing list