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

Matthias Apitz guru at unixarea.de
Fri May 17 07:21:45 CEST 2024


El día viernes, mayo 17, 2024 a las 01:39:55 +0900, NIIBE Yutaka escribió:

> 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:
> ...


I did it already with editing/creating the files and commands
below. 

Putting '--debug' in an variable with Environment= as your hint is far more
elegant and would remove the service override.conf method. The
output went to /var/log/syslog, some 10.000 lines of one PIN request.
I haven't found time to study them.

	matthias

/lib/systemd/system/pcscd.service:

[Unit]
Description=PC/SC Smart Card Daemon
Requires=pcscd.socket
Documentation=man:pcscd(8)

[Service]
ExecStartPre=/bin/bash -c "echo 1 > /sys/class/leds/smc_en/brightness && sleep 2"
ExecStart=/usr/sbin/pcscd --foreground --auto-exit
ExecReload=/usr/sbin/pcscd --hotplug

[Install]
Also=pcscd.socket

/etc/systemd/system/pcscd.service.d/override.conf:

[Unit]
Description=PC/SC Smart Card Daemon
Requires=pcscd.socket
Documentation=man:pcscd(8)

[Service]
ExecStartPre=/bin/bash -c "echo 1 > /sys/class/leds/smc_en/brightness && sleep 2"
# ExecStart=/usr/sbin/pcscd --foreground --auto-exit --debug
ExecReload=/usr/sbin/pcscd --hotplug

[Install]
Also=pcscd.socket

/usr/lib/systemd/system/pcscd.service.d/librem5.conf:

[Service]
Environment="LIBCCID_ifdLogLevel=0xffff"
ExecStartPre=/bin/bash -c "echo 1 > /sys/class/leds/smc_en/brightness && sleep 5"
ExecStopPost=/bin/bash -c "echo 0 > /sys/class/leds/smc_en/brightness"
StandardOutput=syslog
StandardError=syslog

systemctl stop pcscd.service
systemctl daemon-reload
systemctl start pcscd.service


-- 
Matthias Apitz, ✉ guru at unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub

I am not at war with Russia.  Я не воюю с Россией.
Ich bin nicht im Krieg mit Russland.



More information about the Gnupg-users mailing list