Default is "yes". When Prompt: no is specified, it doesn't ask but fails.
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Advanced Search
May 27 2022
The behavior has been changed by T5996, to ask card insertion for the consistency of the semantics of configuration.
May 26 2022
May 25 2022
Pushed the solution which doesn't require new flag for libassuan.
^-- I withdraw the solution (with error value) above.
May 24 2022
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.
Revised version with new flag ASSUAN_CLEAR_INQUIRY_DATA.
Pushed rGea97683d5820: scd: Support automatic card selection for READCERT with keygrip..
I think that it works for PIV card.
May 23 2022
I did some research about scree lockers (xtrlock, slock, swaylock, etc.).
The order to solve:
This is an experimental patch to support "Use-for-ssh":
May 20 2022
cmd_keyinfo should be also updated to access the field correctly.
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 19 2022
For this particular issue of assuan_inquire, if it's needed, the point we should fix is:
May 18 2022
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
AFAICS, we need to implement a new Assuan flag and wipe the data passed to the callback after the callback returned.
Note that this doesn't work if pinentry is pinentry-gnome3. pinentry-qt works well, too, because it supports curses fallback.
I added the last line, to recover tty state:
With cmatrix command and pinentry-gtk2, I now do experiment with this script:
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.
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 17 2022
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.
This is updated version of gpg-auth, which clears the authentication state before trying PKAUTH.
Access is controlled by ~/.ssh/authorized_keys.
This is the one for login authentication (which invokes scdaemon to authenticate, instead of connecting by socket).
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
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
When compiling the package, I can see that all 4 are applied.
May 16 2022
I think that it means that you only applied the last two patches.
Thanks again for your update.
May 14 2022
I just wrote a blog article about this problem
https://ludovicrousseau.blogspot.com/2022/05/scardlistreaders-and-non-initialized.html
May 13 2022
Thanks for opening a ticket.
Thanks a lot for your cooperation.
I put more fix for error handling of key algorithm attribute.
The change: rG53eddf9b9ea0: scd: Fail when no good algorithm attribute.
Thanks a lot for your cooperation.
May 12 2022
Contrary to your expectations, all gpg --card-status fail after yubikey insertion:
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)
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?
Umm... The problem is the last bogus octet from Yubikey. In the log, we see:
May 11 2022
I'm certain I've applied the patches correctly. This is my current patchset:
The change improve error handling for possible other errors by device: rG53eddf9b9ea0: scd: Fail when no good algorithm attribute.
Thank you for the logs. It seems that scdaemon didn't detect the removal correctly.
May 10 2022
I've uploaded the requested information with triple verbose and debug-all setting in the scdaemon.conf as scdaemon.log:
Applied to 2.2 branch, too.
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 9 2022
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.
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 6 2022
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).
I pushed a workaround.
May 2 2022
KexAlgorithms -sntrup761x25519-sha512@openssh.com
Apr 28 2022
FWIW, your comments about the autostart script do not match with the running processes. Obviously, the autostart script starts gpg-agent with different command line options than the running process. My conclusion is that the autostart script isn't used. Or maybe it is started, but gpg-agent immediately terminates because it notices that another instance is already running.
If you add an autostart script then you may have to add a corresponding shutdown script as well, e.g. a script running gpgconf --kill all. You cannot expect that daemons, that you start via an autostart script, magically know when they should terminate.
Thank you for the hints!
Thank you for the explanation. (It's not related to --supervised, I suppose.)
Apr 27 2022
I see the following GPG-related commands running currently (with disable-scdaemon in config file):
The issues mentioned in the previous comment have been fixed.
I had a look at the file system watcher we use to react on changes in the GnuPG home directory. It doesn't watch the private keys living in private-keys-v1.d. Moreover, it does not handle the removal of files properly.
Apr 26 2022
My Yubikey (Yubico.com Yubikey 4/5 OTP+U2F+CCID) (key Ed25519) works fine with OpenSSH using kex of sntrup761x25519-sha512@openssh.com.
Apr 25 2022
Please contact the Debian developers for any systemd/gnupg issues. We don't suggest the use of the --supervised option because it causes more problems than it claims to solve.
Sorry, I was confused. For RSA-4096, data is hashed by gpg-agent and hashed data is signed by a card.
We are using rsa-4096 on smartcard for quite some time; so I wonder what's the problem here. Is that that we don't use our Assuan hack for large key material with OpenPGP.3?
There is another case: RSA-4096 key. scdaemon rejects data by Invalid value. Unfortunately, there is no fix for this, as it's really too large. Even if scdaemon allows larger data, the card implementation rejects, when it conforms to PKCS #1 standard (data should not be larger than 40% of the modulus).
Apr 22 2022
I confirmed that the patch above works with newer Gnuk (>= 1.2.16).
Apr 21 2022
With newer Gnuk Token, following patch should work:
diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c index 05e1f3977..439052f8c 100644 --- a/scd/app-openpgp.c +++ b/scd/app-openpgp.c @@ -5490,6 +5490,11 @@ do_auth (app_t app, ctrl_t ctrl, const char *keyidstr, exmode = 1; /* Use extended length. */ le_value = app->app_local->keyattr[2].rsa.n_bits / 8; } + else if (app->app_local->cardcap.cmd_chaining && indatalen > 254) + { + exmode = -254; /* Command chaining with max. 254 bytes. */ + le_value = 0; + } else if (indatalen > 255) { if (!app->app_local->cardcap.ext_lc_le)