Page MenuHome GnuPG
Feed Advanced Search

Jul 12 2022

gniibe closed T6010: gpg-connect-agent: /definqprog semantics enhancement, a subtask of T5862: authentication with USB token, as Resolved.
Jul 12 2022, 3:12 AM · gpgagent, Feature Request, scd
gniibe closed T6010: gpg-connect-agent: /definqprog semantics enhancement as Resolved.

It's in 2.3.7.

Jul 12 2022, 3:12 AM · Feature Request, scd
gniibe closed T6012: gpg-agent: Add --format=ssh option for READKEY, a subtask of T5862: authentication with USB token, as Resolved.
Jul 12 2022, 3:11 AM · gpgagent, Feature Request, scd

Jul 7 2022

gniibe closed T5979: SCardListReaders: Conditional jump or move depends on uninitialised value(s) as Resolved.
Jul 7 2022, 6:50 AM · backport, gnupg, scd, patch

Jun 28 2022

gniibe closed T5996: ssh,card: "Use-for-ssh:" (was: OpenPGP.3) keys should be on the list even when card is not available, a subtask of T5984: gpg-agent interaction improvement (smartcard improvement #3), as Resolved.
Jun 28 2022, 3:29 AM · ssh, gpgagent, scd
gniibe closed T5996: ssh,card: "Use-for-ssh:" (was: OpenPGP.3) keys should be on the list even when card is not available as Resolved.
Jun 28 2022, 3:29 AM · ssh, gpgagent, scd
gniibe renamed T5996: ssh,card: "Use-for-ssh:" (was: OpenPGP.3) keys should be on the list even when card is not available from ssh,card: OpenPGP.3 keys should be on the list (as default) even when card is not available to ssh,card: "Use-for-ssh:" (was: OpenPGP.3) keys should be on the list even when card is not available.
Jun 28 2022, 3:22 AM · ssh, gpgagent, scd
gniibe added a comment to T5996: ssh,card: "Use-for-ssh:" (was: OpenPGP.3) keys should be on the list even when card is not available.

Having "Use-for-ssh" flag now, experience shows that including OpenPGP.3 keys by default is not convenient.

Jun 28 2022, 3:20 AM · ssh, gpgagent, scd

Jun 9 2022

gniibe closed T5831: Backport (f808012a) scd: Use lock_slot for apdu_send_direct. to GnuPG 2.2 as Resolved.
Jun 9 2022, 7:56 AM · gnupg (gpg22), Bug Report, scd
gniibe added a comment to T5977: Smartcard PIN stays in clear in memory.

Backported to GnuPG 2.2.

Jun 9 2022, 7:39 AM · backport, libassuan, pinentry, scd, gnupg (gpg22), Bug Report

Jun 8 2022

gniibe renamed T5862: authentication with USB token from authentication with USB token, ~~screen lock on token removal~~ to authentication with USB token.
Jun 8 2022, 4:08 AM · gpgagent, Feature Request, scd
gniibe renamed T5862: authentication with USB token from authentication with USB token, screen lock on token removal to authentication with USB token, ~~screen lock on token removal~~.
Jun 8 2022, 4:07 AM · gpgagent, Feature Request, scd
gniibe added a comment to T5862: authentication with USB token.

Now, it also supports a reader with pinpad.

Jun 8 2022, 3:38 AM · gpgagent, Feature Request, scd

Jun 6 2022

gniibe added projects to T5862: authentication with USB token: gpgagent, Restricted Project.
Jun 6 2022, 7:02 AM · gpgagent, Feature Request, scd
gniibe added a comment to T5862: authentication with USB token.

Updated (with T6012):


Jun 6 2022, 7:00 AM · gpgagent, Feature Request, scd

Jun 2 2022

gniibe added a project to T6010: gpg-connect-agent: /definqprog semantics enhancement: Restricted Project.
Jun 2 2022, 8:53 AM · Feature Request, scd
gniibe added a comment to T5862: authentication with USB token.

See https://github.com/google/xsecurelock/blob/master/helpers/authproto.h
for the interaction between xsecurelock and the helper.

Jun 2 2022, 8:25 AM · gpgagent, Feature Request, scd
gniibe triaged T6010: gpg-connect-agent: /definqprog semantics enhancement as Normal priority.
Jun 2 2022, 8:15 AM · Feature Request, scd
gniibe added a comment to T5862: authentication with USB token.

I changed gpg-connect-agent (added --unbuffered option) so that we can write shell script interacting gpg-agent.

Jun 2 2022, 8:06 AM · gpgagent, Feature Request, scd
gniibe added a comment to T5862: authentication with USB token.

Wrote a shell script for xsecurelock's authproto (helper executable):

Jun 2 2022, 8:02 AM · gpgagent, Feature Request, scd

Jun 1 2022

gniibe claimed T5977: Smartcard PIN stays in clear in memory.
Jun 1 2022, 5:05 AM · backport, libassuan, pinentry, scd, gnupg (gpg22), Bug Report

May 29 2022

werner added a project to T4938: Support Signature Card V2.0 (NKS15): eIDAS.
May 29 2022, 3:55 PM · eIDAS, scd, Feature Request, S/MIME
werner added a project to T5219: scd: Generating CSR for SigG NetKey card key fails: eIDAS.
May 29 2022, 3:54 PM · gnupg24, eIDAS, gnupg (gpg23), scd
werner raised the priority of T5219: scd: Generating CSR for SigG NetKey card key fails from Low to Normal.

Related problem exists with the modern ESIGN application. I think I fixed that but the whole Telesec eIDAS QES case needs more work.

May 29 2022, 3:51 PM · gnupg24, eIDAS, gnupg (gpg23), scd

May 27 2022

sergi added a watcher for scd: sergi.
May 27 2022, 10:10 PM
gniibe added a project to T5987: card: New field to specify refusing operations when card/token is not available: Restricted Project.
May 27 2022, 3:02 AM · ssh, gpgagent, scd
gniibe added a comment to T5987: card: New field to specify refusing operations when card/token is not available.

Default is "yes". When Prompt: no is specified, it doesn't ask but fails.

May 27 2022, 2:48 AM · ssh, gpgagent, scd
gniibe added a comment to T5987: card: New field to specify refusing operations when card/token is not available.

The behavior has been changed by T5996, to ask card insertion for the consistency of the semantics of configuration.

May 27 2022, 2:47 AM · ssh, gpgagent, scd
gniibe updated the task description for T5987: card: New field to specify refusing operations when card/token is not available.
May 27 2022, 2:45 AM · ssh, gpgagent, scd

May 26 2022

gniibe added a project to T5996: ssh,card: "Use-for-ssh:" (was: OpenPGP.3) keys should be on the list even when card is not available: Restricted Project.
May 26 2022, 10:19 AM · ssh, gpgagent, scd

May 25 2022

gniibe added a comment to T5977: Smartcard PIN stays in clear in memory.

Pushed the solution which doesn't require new flag for libassuan.

May 25 2022, 9:42 AM · backport, libassuan, pinentry, scd, gnupg (gpg22), Bug Report
gniibe added a project to T5977: Smartcard PIN stays in clear in memory: Restricted Project.
May 25 2022, 9:39 AM · backport, libassuan, pinentry, scd, gnupg (gpg22), Bug Report
gniibe added a project to T5977: Smartcard PIN stays in clear in memory: backport.
May 25 2022, 7:59 AM · backport, libassuan, pinentry, scd, gnupg (gpg22), Bug Report
gniibe added a comment to T5977: Smartcard PIN stays in clear in memory.

^-- I withdraw the solution (with error value) above.

May 25 2022, 4:57 AM · backport, libassuan, pinentry, scd, gnupg (gpg22), Bug Report

May 24 2022

gniibe added a project to T6003: card: READCERT with KEYGRIP: Restricted Project.
May 24 2022, 2:04 PM · scd, Feature Request
gniibe added a comment to T5977: Smartcard PIN stays in clear in memory.

Or, it would be good for client side (in this case, gpg-agent) to specify the flag in the inquiry callback, that is, it's a kind of transient flag for a single transaction.

May 24 2022, 10:45 AM · backport, libassuan, pinentry, scd, gnupg (gpg22), Bug Report
gniibe added a comment to T5977: Smartcard PIN stays in clear in memory.

Revised version with new flag ASSUAN_CLEAR_INQUIRY_DATA.

May 24 2022, 10:33 AM · backport, libassuan, pinentry, scd, gnupg (gpg22), Bug Report
gniibe added a comment to T6003: card: READCERT with KEYGRIP.

Pushed rGea97683d5820: scd: Support automatic card selection for READCERT with keygrip..
I think that it works for PIV card.

May 24 2022, 9:21 AM · scd, Feature Request
gniibe updated the task description for T6003: card: READCERT with KEYGRIP.
May 24 2022, 9:13 AM · scd, Feature Request
gniibe triaged T6003: card: READCERT with KEYGRIP as Normal priority.
May 24 2022, 7:22 AM · scd, Feature Request

May 23 2022

gniibe added a comment to T5862: authentication with USB token.

I did some research about scree lockers (xtrlock, slock, swaylock, etc.).

May 23 2022, 9:11 AM · gpgagent, Feature Request, scd
gniibe renamed T5984: gpg-agent interaction improvement (smartcard improvement #3) from gpg-agent interaction improvement ( (smartcard improvement #3) to gpg-agent interaction improvement (smartcard improvement #3).
May 23 2022, 6:41 AM · ssh, gpgagent, scd
gniibe added a comment to T5984: gpg-agent interaction improvement (smartcard improvement #3).

The order to solve:

May 23 2022, 3:39 AM · ssh, gpgagent, scd
gniibe triaged T5996: ssh,card: "Use-for-ssh:" (was: OpenPGP.3) keys should be on the list even when card is not available as Normal priority.
May 23 2022, 3:35 AM · ssh, gpgagent, scd
gniibe lowered the priority of T5985: private-key: Support "Use-for-ssh" flag from Normal to Low.
May 23 2022, 3:24 AM · Feature Request, ssh, gpgagent
gniibe triaged T5995: Better prompt with SETKEYDESC as Normal priority.
May 23 2022, 3:15 AM · gnupg24, ssh, gpgagent, scd
gniibe added a comment to T5985: private-key: Support "Use-for-ssh" flag.

This is an experimental patch to support "Use-for-ssh":

May 23 2022, 2:55 AM · Feature Request, ssh, gpgagent

May 20 2022

gniibe added a comment to T5985: private-key: Support "Use-for-ssh" flag.

cmd_keyinfo should be also updated to access the field correctly.

May 20 2022, 7:59 AM · Feature Request, ssh, gpgagent
gniibe added a project to T5986: card: Show "Label:" when prompting the insertion of a card: Restricted Project.
May 20 2022, 7:41 AM · ssh, gpgagent, scd
gniibe added subtasks for T5984: gpg-agent interaction improvement (smartcard improvement #3): T5099: Confirmation dialog for remote access (restricted extra socket), T5702: Display prompt to user when YubiKey is waiting for touch confirmation.
May 20 2022, 6:53 AM · ssh, gpgagent, scd
gniibe renamed T5984: gpg-agent interaction improvement (smartcard improvement #3) from smartcard interaction improvement #3 to gpg-agent interaction improvement ( (smartcard improvement #3).
May 20 2022, 6:39 AM · ssh, gpgagent, scd
gniibe triaged T5988: agent: Add new command to update private key fields as Normal priority.
May 20 2022, 6:38 AM · Feature Request, ssh, gpgagent
gniibe triaged T5987: card: New field to specify refusing operations when card/token is not available as Normal priority.
May 20 2022, 6:33 AM · ssh, gpgagent, scd
gniibe added a comment to T5986: card: Show "Label:" when prompting the insertion of a card.

Also, it is better for a user, not to be asked confirmation (even if "Confirm:" is specified), that is, skipping the confirmation, when it is going to prompt the insertion of a card.

May 20 2022, 6:29 AM · ssh, gpgagent, scd
gniibe triaged T5986: card: Show "Label:" when prompting the insertion of a card as Normal priority.
May 20 2022, 6:27 AM · ssh, gpgagent, scd
gniibe triaged T5985: private-key: Support "Use-for-ssh" flag as Normal priority.
May 20 2022, 6:23 AM · Feature Request, ssh, gpgagent
gniibe triaged T5984: gpg-agent interaction improvement (smartcard improvement #3) as Normal priority.
May 20 2022, 6:21 AM · ssh, gpgagent, scd

May 19 2022

gniibe added a comment to T5977: Smartcard PIN stays in clear in memory.

For this particular issue of assuan_inquire, if it's needed, the point we should fix is:

May 19 2022, 6:29 AM · backport, libassuan, pinentry, scd, gnupg (gpg22), Bug Report

May 18 2022

gniibe added a comment to T5862: authentication with USB token.

A concrete example use case in my mind is:

  • (Usual display manager (authentication by password or no-password))
  • session starts with "locked" state of screen
    • In the beginning, user needs to "unlock" the screen, by scdaemon authentication
  • (optionally, if needed) our-own-screen-locker should detect device removal, then, automatically locks the screen
  • our-own-screen-locker should detect idling user session, then, disabling the card, automatically locks the screen
  • our-own-screen-locker does authentication by scdaemon when it unlocks the screen
May 18 2022, 9:34 AM · gpgagent, Feature Request, scd
werner added a project to T5977: Smartcard PIN stays in clear in memory: libassuan.
May 18 2022, 9:14 AM · backport, libassuan, pinentry, scd, gnupg (gpg22), Bug Report
werner added a comment to T5977: Smartcard PIN stays in clear in memory.

AFAICS, we need to implement a new Assuan flag and wipe the data passed to the callback after the callback returned.

May 18 2022, 9:14 AM · backport, libassuan, pinentry, scd, gnupg (gpg22), Bug Report
gniibe added a comment to T5862: authentication with USB token.

Note that this doesn't work if pinentry is pinentry-gnome3. pinentry-qt works well, too, because it supports curses fallback.

May 18 2022, 9:06 AM · gpgagent, Feature Request, scd
gniibe added a comment to T5862: authentication with USB token.

I added the last line, to recover tty state:

May 18 2022, 8:56 AM · gpgagent, Feature Request, scd
gniibe added a comment to T5862: authentication with USB token.

With cmatrix command and pinentry-gtk2, I now do experiment with this script:

May 18 2022, 5:09 AM · gpgagent, Feature Request, scd
oddlama added a comment to T5971: Yubikey: Removal of device is not detected by PC/SC.

Glad to hear. I've also now had time to manually apply the patches and have not seen any issues so far! Thank you! If anything does turn up later down the road I'll let you know.

May 18 2022, 2:10 AM · Info Needed, yubikey, scd, Bug Report
gniibe added a comment to T5971: Yubikey: Removal of device is not detected by PC/SC.

No, no apologize needed. You did your best for the bug report, and it helped us a lot to identify the issue, and it certainly helped resulting the fixes. Moreover, your report kicked another fix of T5979 (thanks to the valgrind output).
Thank you.

May 18 2022, 1:37 AM · Info Needed, yubikey, scd, Bug Report

May 17 2022

oddlama added a comment to T5971: Yubikey: Removal of device is not detected by PC/SC.

I apologize, you seem to be right. Even though the package build log shows that all patches were applied, it seems there are some hunks missing in the generated sources.
I've attached my patches, but those are most likely correct. There seems to be an issue with my distribution's package manager. I will investigate this and report back afterwards. Maybe I'll just build it manually.

May 17 2022, 1:34 PM · Info Needed, yubikey, scd, Bug Report
gniibe added a comment to T5862: authentication with USB token.

This is updated version of gpg-auth, which clears the authentication state before trying PKAUTH.
Access is controlled by ~/.ssh/authorized_keys.

May 17 2022, 11:18 AM · gpgagent, Feature Request, scd
gniibe added a comment to T5862: authentication with USB token.

This is the one for login authentication (which invokes scdaemon to authenticate, instead of connecting by socket).

May 17 2022, 10:59 AM · gpgagent, Feature Request, scd
gniibe added a project to T5979: SCardListReaders: Conditional jump or move depends on uninitialised value(s): Restricted Project.

To detect these kinds of bugs, possibly, we can use new GCC option: -ftrivial-auto-var-init=0xFEFEFEFE.
https://gcc.gnu.org/gcc-12/changes.html#uninitialized

May 17 2022, 3:34 AM · backport, gnupg, scd, patch
gniibe claimed T5979: SCardListReaders: Conditional jump or move depends on uninitialised value(s).

The bug was there when it was initially written. It was in 2003, which introduced PC/SC in rG1bcf8ef9dea1: Cleanups, fixes and PC/SC support

May 17 2022, 3:29 AM · backport, gnupg, scd, patch
gniibe added a comment to T5971: Yubikey: Removal of device is not detected by PC/SC.

When compiling the package, I can see that all 4 are applied.

May 17 2022, 2:41 AM · Info Needed, yubikey, scd, Bug Report

May 16 2022

oddlama added a comment to T5971: Yubikey: Removal of device is not detected by PC/SC.

I think that it means that you only applied the last two patches.

May 16 2022, 4:14 PM · Info Needed, yubikey, scd, Bug Report
gniibe added a comment to T5971: Yubikey: Removal of device is not detected by PC/SC.

Thanks again for your update.

May 16 2022, 3:08 AM · Info Needed, yubikey, scd, Bug Report

May 14 2022

ludovic added a comment to T5979: SCardListReaders: Conditional jump or move depends on uninitialised value(s).

I just wrote a blog article about this problem
https://ludovicrousseau.blogspot.com/2022/05/scardlistreaders-and-non-initialized.html

May 14 2022, 4:13 PM · backport, gnupg, scd, patch

May 13 2022

werner added projects to T3391: cannot import subkey that was once marked to be on a card: scd, gpgagent.
May 13 2022, 2:43 PM · Restricted Project, gpgagent, scd, gnupg, OpenPGP, Bug Report
werner triaged T5977: Smartcard PIN stays in clear in memory as High priority.
May 13 2022, 2:40 PM · backport, libassuan, pinentry, scd, gnupg (gpg22), Bug Report
werner triaged T5979: SCardListReaders: Conditional jump or move depends on uninitialised value(s) as High priority.

Thanks for opening a ticket.

May 13 2022, 2:36 PM · backport, gnupg, scd, patch
oddlama added a comment to T5971: Yubikey: Removal of device is not detected by PC/SC.

Thanks a lot for your cooperation.

May 13 2022, 2:28 PM · Info Needed, yubikey, scd, Bug Report
gniibe added a comment to T5971: Yubikey: Removal of device is not detected by PC/SC.

I put more fix for error handling of key algorithm attribute.
The change: rG53eddf9b9ea0: scd: Fail when no good algorithm attribute.

May 13 2022, 3:21 AM · Info Needed, yubikey, scd, Bug Report
gniibe added a comment to T5971: Yubikey: Removal of device is not detected by PC/SC.

Thanks a lot for your cooperation.

May 13 2022, 3:15 AM · Info Needed, yubikey, scd, Bug Report

May 12 2022

oddlama added a comment to T5971: Yubikey: Removal of device is not detected by PC/SC.

Contrary to your expectations, all gpg --card-status fail after yubikey insertion:

May 12 2022, 7:48 PM · Info Needed, yubikey, scd, Bug Report
gniibe added a comment to T5971: Yubikey: Removal of device is not detected by PC/SC.

Please do experiment again and give us the whole log of scdaemon.log for:

  • insert Yubikey initially
  • run gpg --card-status (success is expected)
  • remove Yubikey
  • insert Yubikey second time
  • run gpg --card-status (failure is expected)
May 12 2022, 5:19 PM · Info Needed, yubikey, scd, Bug Report
oddlama added a comment to T5971: Yubikey: Removal of device is not detected by PC/SC.

In case you need any information, be sure to let me know. Maybe we can add some manual loggers to the patches, to confirm that everything is working as you imagine it to?

May 12 2022, 12:36 PM · Info Needed, yubikey, scd, Bug Report
gniibe added a comment to T5971: Yubikey: Removal of device is not detected by PC/SC.

Umm... The problem is the last bogus octet from Yubikey. In the log, we see:

May 12 2022, 1:43 AM · Info Needed, yubikey, scd, Bug Report

May 11 2022

oddlama added a comment to T5971: Yubikey: Removal of device is not detected by PC/SC.

I'm certain I've applied the patches correctly. This is my current patchset:

May 11 2022, 12:49 PM · Info Needed, yubikey, scd, Bug Report
gniibe added a comment to T5963: Yubikey: scdaemon causes libc segfault and clashes with ECC keys.

The change improve error handling for possible other errors by device: rG53eddf9b9ea0: scd: Fail when no good algorithm attribute.

May 11 2022, 4:31 AM · backport, yubikey, scd, segv, Bug Report
gniibe added a comment to T5971: Yubikey: Removal of device is not detected by PC/SC.

Thank you for the logs. It seems that scdaemon didn't detect the removal correctly.

May 11 2022, 1:50 AM · Info Needed, yubikey, scd, Bug Report

May 10 2022

oddlama added a comment to T5971: Yubikey: Removal of device is not detected by PC/SC.

I've uploaded the requested information with triple verbose and debug-all setting in the scdaemon.conf as scdaemon.log:

May 10 2022, 10:17 PM · Info Needed, yubikey, scd, Bug Report
gniibe edited projects for T5963: Yubikey: scdaemon causes libc segfault and clashes with ECC keys, added: Restricted Project; removed gnupg.

Applied to 2.2 branch, too.

May 10 2022, 7:29 AM · backport, yubikey, scd, segv, Bug Report
gniibe removed a project from T5971: Yubikey: Removal of device is not detected by PC/SC: gnupg.
May 10 2022, 7:00 AM · Info Needed, yubikey, scd, Bug Report
gniibe removed a project from T5963: Yubikey: scdaemon causes libc segfault and clashes with ECC keys: Info Needed.
May 10 2022, 3:50 AM · backport, yubikey, scd, segv, Bug Report
gniibe added a comment to T5963: Yubikey: scdaemon causes libc segfault and clashes with ECC keys.

I examined all log files you gave us, and I think that scdaemon with PC/SC fails to detect the removal of the USB device.

May 10 2022, 3:48 AM · backport, yubikey, scd, segv, Bug Report
gniibe triaged T5971: Yubikey: Removal of device is not detected by PC/SC as Normal priority.
May 10 2022, 2:51 AM · Info Needed, yubikey, scd, Bug Report

May 9 2022

oddlama added a comment to T5963: Yubikey: scdaemon causes libc segfault and clashes with ECC keys.

I've applied the linked patch, but still experience the error. Most of the times, I cannot access my yubikey at all and I am not sure what is blocking it.
I've tried to include as much debugging output as I could below. Please let me know if there is anything else I can do to debug this.

May 9 2022, 12:54 PM · backport, yubikey, scd, segv, Bug Report
gniibe added a project to T5963: Yubikey: scdaemon causes libc segfault and clashes with ECC keys: backport.
May 9 2022, 6:52 AM · backport, yubikey, scd, segv, Bug Report
gniibe added a project to T5963: Yubikey: scdaemon causes libc segfault and clashes with ECC keys: Info Needed.

The patch rG054d14887ef8: scd: Add workaround for ECC attribute on Yubikey. fixes a particular problem of Yubikey implementation where it returns bogus octet for its data object of C1, C2, and C3.

May 9 2022, 4:53 AM · backport, yubikey, scd, segv, Bug Report

May 6 2022

oddlama added a comment to T5963: Yubikey: scdaemon causes libc segfault and clashes with ECC keys.

With the patch and after starting a new gpg-agent, gpg --card-status now works immediately.
But when I re-plug the yubikey, gpg reports gpg: OpenPGP card not available: Card error until either gpg-agent is restarted, or pcscd is restarted.
pcsc-lite in debug mode reports no errors, but one log is obviously much shorter as gpg fails early (I've attached both, same pcscd and gpg-agent instance).

May 6 2022, 1:42 PM · backport, yubikey, scd, segv, Bug Report
gniibe added a comment to T5963: Yubikey: scdaemon causes libc segfault and clashes with ECC keys.

I pushed a workaround.

May 6 2022, 11:28 AM · backport, yubikey, scd, segv, Bug Report
gniibe renamed T5963: Yubikey: scdaemon causes libc segfault and clashes with ECC keys from scdaemon causes libc segfault and clashes with pcsc-lite despite using disable-ccid to Yubikey: scdaemon causes libc segfault and clashes with ECC keys.
May 6 2022, 11:26 AM · backport, yubikey, scd, segv, Bug Report