Page MenuHome GnuPG
Feed Advanced Search

Aug 24 2021

werner triaged T5565: Release GnuPG 2.3.3 as Normal priority.
Aug 24 2021, 7:30 PM · gnupg (gpg23), Release Info
gniibe added a comment to T5556: Use of offsetof is better for allocation of flexible array.
t-fam.c: In function 'main':
t-fam.c:34:14: warning: array subscript 'struct arg_and_data_s[0]' is partly outside array bounds of 'unsigned char[22]' [-Warray-bounds]
   34 |   aad0->next = NULL;
      |              ^
t-fam.c:30:10: note: referencing an object of size 22 allocated by 'malloc'
   30 |   aad0 = malloc (offsetof (struct arg_and_data_s, arg) + 2);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
t-fam.c:35:13: warning: array subscript 'struct arg_and_data_s[0]' is partly outside array bounds of 'unsigned char[22]' [-Warray-bounds]
   35 |   aad0->len = 2;
      |   ~~~~~~~~~~^~~
t-fam.c:30:10: note: referencing an object of size 22 allocated by 'malloc'
   30 |   aad0 = malloc (offsetof (struct arg_and_data_s, arg) + 2);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
t-fam.c:36:15: warning: array subscript 'struct arg_and_data_s[0]' is partly outside array bounds of 'unsigned char[22]' [-Warray-bounds]
   36 |   aad0->flags = 0;
      |   ~~~~~~~~~~~~^~~
t-fam.c:30:10: note: referencing an object of size 22 allocated by 'malloc'
   30 |   aad0 = malloc (offsetof (struct arg_and_data_s, arg) + 2);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
t-fam.c:37:18: warning: array subscript 'struct arg_and_data_s[0]' is partly outside array bounds of 'unsigned char[22]' [-Warray-bounds]
   37 |   aad0->print_fd = fd;
      |   ~~~~~~~~~~~~~~~^~~~
t-fam.c:30:10: note: referencing an object of size 22 allocated by 'malloc'
   30 |   aad0 = malloc (offsetof (struct arg_and_data_s, arg) + 2);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Aug 24 2021, 7:29 AM · gnupg24, gpgme, libgcrypt
gniibe added a comment to T5556: Use of offsetof is better for allocation of flexible array.

For GCC 11, modified version of struct arg_and_data_s has an issue for x86_64.

Aug 24 2021, 4:53 AM · gnupg24, gpgme, libgcrypt

Aug 23 2021

werner claimed T5562: GnuPG behaves inconsistently across versions when a secret key is not found during decryption.
Aug 23 2021, 1:19 PM · Bug Report, gnupg (gpg23)
werner added a comment to T5562: GnuPG behaves inconsistently across versions when a secret key is not found during decryption.

Oh yes, I was blind.

Aug 23 2021, 9:56 AM · Bug Report, gnupg (gpg23)
gniibe added a comment to T5562: GnuPG behaves inconsistently across versions when a secret key is not found during decryption.

Here is the place:
https://dev.gnupg.org/source/gnupg/browse/master/g10/pubkey-enc.c$151

Aug 23 2021, 9:10 AM · Bug Report, gnupg (gpg23)
werner added a comment to T5562: GnuPG behaves inconsistently across versions when a secret key is not found during decryption.

A cursory look doesn't show me where list->result is set to something else than -1. Can you give me a hint?

Aug 23 2021, 9:07 AM · Bug Report, gnupg (gpg23)
gniibe added a comment to T5562: GnuPG behaves inconsistently across versions when a secret key is not found during decryption.

In GnuPG 2.3, the procedure of decryption has been changed;
It now collects all ENC_TO packet, keeping it to ->PKENC_LIST field, and then process ENCRYPTED packet with the list.

Aug 23 2021, 8:43 AM · Bug Report, gnupg (gpg23)
gniibe added a comment to T5556: Use of offsetof is better for allocation of flexible array.

For the use case of struct arg_and_data_s in gpgme, which may allocate zero-sized ARG[], it seems that GCC 11 interprets it as an invalid use.

Aug 23 2021, 6:25 AM · gnupg24, gpgme, libgcrypt
gniibe added projects to T5556: Use of offsetof is better for allocation of flexible array: libgcrypt, gpgme, gnupg (gpg23).
Aug 23 2021, 4:47 AM · gnupg24, gpgme, libgcrypt

Aug 21 2021

werner triaged T5562: GnuPG behaves inconsistently across versions when a secret key is not found during decryption as High priority.
Aug 21 2021, 12:47 PM · Bug Report, gnupg (gpg23)

Aug 20 2021

vsajip created T5562: GnuPG behaves inconsistently across versions when a secret key is not found during decryption.
Aug 20 2021, 11:05 PM · Bug Report, gnupg (gpg23)
shtrom added a comment to T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations.

I added "disable-application piv" to ~/.gnupg/scdaemon.conf and the behavior went back to pin caching working as before. Since I don't use PIV, this is an acceptable workaround for me.

Aug 20 2021, 5:46 AM · gnupg24, yubikey, Bug Report

Aug 14 2021

cnp1234 added a comment to T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations.

Based on the info about this being caused by the added support of PIV, I poked around on the docs at https://gnupg.org/documentation/manuals/gnupg/gpg_002dcard.html and noticed the disable-application stuff. I added "disable-application piv" to ~/.gnupg/scdaemon.conf and the behavior went back to pin caching working as before. Since I don't use PIV, this is an acceptable workaround for me.

Aug 14 2021, 9:05 PM · gnupg24, yubikey, Bug Report

Aug 13 2021

werner changed the edit policy for T5405: Release GnuPG 2.3.2.
Aug 13 2021, 11:54 AM · gnupg (gpg23), Release Info
werner placed T5405: Release GnuPG 2.3.2 up for grabs.
Aug 13 2021, 11:54 AM · gnupg (gpg23), Release Info
jace888 updated subscribers of T5405: Release GnuPG 2.3.2.
Aug 13 2021, 11:41 AM · gnupg (gpg23), Release Info
jace888 claimed T5405: Release GnuPG 2.3.2.
Aug 13 2021, 11:40 AM · gnupg (gpg23), Release Info

Jul 30 2021

bernhard added a comment to T4393: GnuPG should always accept key updates even if the update does not contain UIDs.

bug has been closed as Wontfix [..] I see no reason to continue the discussion in the bugtracker.

Jul 30 2021, 5:23 PM · gnupg (gpg23), Feature Request
werner triaged T5538: gpg-agent's keytocard cmd should use a better default creation time. as Normal priority.
Jul 30 2021, 1:24 PM · gpgagent, gnupg (gpg23)
werner added a comment to T4393: GnuPG should always accept key updates even if the update does not contain UIDs.

This bug has been closed as Wontfix more than a year ago. I see no reason to continue the discussion in the bugtracker.

Jul 30 2021, 9:20 AM · gnupg (gpg23), Feature Request

Jul 29 2021

dkg added a comment to T4393: GnuPG should always accept key updates even if the update does not contain UIDs.

I share your concerns about centralization of keyserver infrastructure. Rejecting this security fix doesn't help keep keyservers decentralized, though.

Jul 29 2021, 9:27 PM · gnupg (gpg23), Feature Request

Jul 28 2021

bernhard added a comment to T4393: GnuPG should always accept key updates even if the update does not contain UIDs.

It is now over 10 months that the proponents of these additions have not followed up on the discussion.

Jul 28 2021, 3:42 PM · gnupg (gpg23), Feature Request

Jul 27 2021

werner triaged T5531: dirmngr --validate broken for DER encoded files as Normal priority.
Jul 27 2021, 7:59 AM · gnupg (gpg23), dirmngr, Bug Report

Jul 22 2021

gniibe added projects to T5524: scd: serialize access of ctrl->card_ctx: Restricted Project, gnupg (gpg23).
Jul 22 2021, 4:38 AM · gnupg (gpg23), Restricted Project, scd

Jul 8 2021

Jakuje added a comment to T5521: Use of conscious language.

There is no point in questioning whether a couple of words change racism or any other human problems of these days. It will not.

Jul 8 2021, 10:38 AM · gnupg24, Won't Fix, Feature Request, gnupg (gpg23), libgcrypt

Jul 7 2021

werner triaged T5521: Use of conscious language as Wishlist priority.

Sorry, this is not acceptable to me. <rant>You don't change racism by avoid words which are may be connected to racism. Master is a term used for example to indicate that a person is proficient in her profession. Slave is (in theory) a historic term to describe, well slaves. That is humans who are non-free and are not allowed to control their lives - like the majority of humans these days - they are just called different and the methods of suppression are different than in the past. In fact a Roman slave (but not a medieval bondsman) had well defined and esteemed rights not something the majority of US citizen with a dark skin has in practice. Term abolished, racism abolished, works as good as freeing the US slaves in the 1856, the 1960, or still today. It did not work. Mr. Kings hope has not yet realized itself and is now maybe farther away than we all had hoped in the second half of the last century. Don't cover facts by changing words used in a very different context.</rant>

Jul 7 2021, 5:48 PM · gnupg24, Won't Fix, Feature Request, gnupg (gpg23), libgcrypt
Jakuje created T5521: Use of conscious language.
Jul 7 2021, 5:00 PM · gnupg24, Won't Fix, Feature Request, gnupg (gpg23), libgcrypt

Jun 29 2021

werner triaged T5449: gnupg: Do not use SHA1 by default as Low priority.

The original idea with the DNS code was just to source copy it but it turned out that we need to maintain it in GnuPG. Thus adding support for SHA256 makes sense to keep the code current in case we ever need to use it.

Jun 29 2021, 3:49 PM · gnupg24, gnupg (gpg23), Bug Report

Jun 24 2021

werner moved T5353: gpgme: Implement keylist_data for gpgsm from Backlog to For a future release on the gpgme board.
Jun 24 2021, 6:21 PM · gnupg24, gnupg (gpg23), gpgme, Feature Request

Jun 9 2021

gniibe renamed T5442: Serial number detection of Yubikey 5 (Yubikey 5 doesn't work after updating to GnuPG 2.3.1) from Yubikey 5 doesn't work after updating to GnuPG 2.3.1 on macOS Big Sur 11.2.3 to Serial number detection of Yubikey 5 (Yubikey 5 doesn't work after updating to GnuPG 2.3.1).
Jun 9 2021, 2:18 AM · gnupg (gpg23), yubikey
gniibe added a comment to T5442: Serial number detection of Yubikey 5 (Yubikey 5 doesn't work after updating to GnuPG 2.3.1).

For the Data Object of serial number, what I read is this code: https://github.com/Yubico/yubikey-manager

Jun 9 2021, 1:53 AM · gnupg (gpg23), yubikey

Jun 8 2021

werner added a comment to T5442: Serial number detection of Yubikey 5 (Yubikey 5 doesn't work after updating to GnuPG 2.3.1).

FWIW: Actually the old code assumed that the s/n is at least 4 bytes. IIRC, I once checked the source of the Yubico tools to get this info.

Jun 8 2021, 8:30 AM · gnupg (gpg23), yubikey
gniibe added a comment to T5442: Serial number detection of Yubikey 5 (Yubikey 5 doesn't work after updating to GnuPG 2.3.1).

The device with serial number 10000003, it is represented as three bytes: 00989683

Jun 8 2021, 3:40 AM · gnupg (gpg23), yubikey

Jun 7 2021

gniibe changed the status of T5469: GnuPG 2.3 regression: keydb_search failed: Invalid argument from Open to Testing.
Jun 7 2021, 7:10 AM · gnupg (gpg23)
gniibe edited projects for T5442: Serial number detection of Yubikey 5 (Yubikey 5 doesn't work after updating to GnuPG 2.3.1), added: gnupg (gpg23); removed gnupg, MacOS.

In 2.3, the logic to identify Yubikey has been changed (to support PIV application).

Jun 7 2021, 5:28 AM · gnupg (gpg23), yubikey

Jun 3 2021

gniibe added a comment to T5469: GnuPG 2.3 regression: keydb_search failed: Invalid argument.

Here, we use keygrip search: https://dev.gnupg.org/source/gnupg/browse/master/g10/skclist.c$429

Jun 3 2021, 4:52 AM · gnupg (gpg23)
gniibe triaged T5469: GnuPG 2.3 regression: keydb_search failed: Invalid argument as High priority.
Jun 3 2021, 4:48 AM · gnupg (gpg23)

Jun 2 2021

werner triaged T5463: gpgconf: Options that gpgconf won't change should be flagged as read-only as Normal priority.

There is also the issue that options flagged as ignore or forced in the global config file won't have an effect either. But indeed we could mark them as non-change.

Jun 2 2021, 5:00 PM · gnupg24, gnupg (gpg23), Feature Request
werner reopened T5462: gpgconf: Make gpg/keyserver option available again as "Open".
Jun 2 2021, 7:59 AM · gnupg (gpg23), Restricted Project
werner closed T5462: gpgconf: Make gpg/keyserver option available again as Resolved.

Because an existing setting in gpg.conf overrides the keyserver set in dirmngr.conf

Jun 2 2021, 7:59 AM · gnupg (gpg23), Restricted Project

Jun 1 2021

dkg added a comment to T5462: gpgconf: Make gpg/keyserver option available again.

why not use gpgconf with the dirmngr component to set the keyserver option there?

Jun 1 2021, 11:07 PM · gnupg (gpg23), Restricted Project
ikloecker placed T5462: gpgconf: Make gpg/keyserver option available again up for grabs.
Jun 1 2021, 4:09 PM · gnupg (gpg23), Restricted Project
ikloecker created T5462: gpgconf: Make gpg/keyserver option available again.
Jun 1 2021, 10:07 AM · gnupg (gpg23), Restricted Project

May 28 2021

gniibe edited projects for T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations, added: yubikey; removed MacOS.
May 28 2021, 7:19 AM · gnupg24, yubikey, Bug Report
gniibe triaged T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations as High priority.
May 28 2021, 7:18 AM · gnupg24, yubikey, Bug Report
gniibe claimed T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations.

Thanks. I push the fix of yours.

May 28 2021, 7:17 AM · gnupg24, yubikey, Bug Report
gniibe merged T5451: disable-ccid breaks gpg-agent caching on MacOS (gpg 2.3.1) into T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations.
May 28 2021, 3:23 AM · gnupg24, yubikey, Bug Report
gniibe merged task T5451: disable-ccid breaks gpg-agent caching on MacOS (gpg 2.3.1) into T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations.
May 28 2021, 3:23 AM · scd, gnupg (gpg23), MacOS, Bug Report

May 26 2021

werner added projects to T5451: disable-ccid breaks gpg-agent caching on MacOS (gpg 2.3.1): MacOS, gnupg (gpg23), scd.
May 26 2021, 5:48 PM · scd, gnupg (gpg23), MacOS, Bug Report

May 25 2021

werner edited projects for T5449: gnupg: Do not use SHA1 by default, added: gnupg (gpg23); removed gnupg.
May 25 2021, 12:49 PM · gnupg24, gnupg (gpg23), Bug Report
lbogdan added a comment to T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations.

@werner @ikloecker Any more thoughts / updates on this?

May 25 2021, 11:40 AM · gnupg24, yubikey, Bug Report
werner triaged T5444: "gpg: key generation failed: Unknown elliptic curve" from "Key-Type: default" as Normal priority.

You should anyway use --quick-gen-key.

May 25 2021, 8:37 AM · gnupg24, gnupg (gpg23)
cbiedl added a comment to T5444: "gpg: key generation failed: Unknown elliptic curve" from "Key-Type: default".

Setting a curve type (which shouldn't be necessary) like "Curve-Type: ed25519" doesn't help either. While this makes the check in gpg pass, the gpg-agent process re-checks the parameter set and rejects it with the same error message.

May 25 2021, 8:17 AM · gnupg24, gnupg (gpg23)

May 24 2021

Jakuje added a comment to T5393: gnupg coverity static analysis reports.

Thank you. I checked what was missing and all looks good. But do not understand why the last gpgsplit xfree was not applied. We are leaving a block where this variable is dynamically allocated so even without error we need to free it.

May 24 2021, 4:36 PM · gnupg (gpg23), Bug Report

May 21 2021

werner triaged T5447: Add feature to delete a key from an LDAP server as Normal priority.
May 21 2021, 11:44 AM · vsd33, Restricted Project, gnupg24, LDAP

May 20 2021

werner added a comment to T5393: gnupg coverity static analysis reports.

The first two patch sets are now applied with the exception of
the gpgsplit fix; I did not applied that patch to add a free() in case of write errors.

May 20 2021, 5:37 PM · gnupg (gpg23), Bug Report
aheinecke added a comment to T5444: "gpg: key generation failed: Unknown elliptic curve" from "Key-Type: default".

Ha! This would have affected Kleopatra if we followed werners suggestion to use default. But in Kleo I decided that I needed to show my users what the default is so we do not use default in this case.

May 20 2021, 12:32 PM · gnupg24, gnupg (gpg23)
cbiedl assigned T5444: "gpg: key generation failed: Unknown elliptic curve" from "Key-Type: default" to wk.
May 20 2021, 12:29 PM · gnupg24, gnupg (gpg23)
cbiedl created T5444: "gpg: key generation failed: Unknown elliptic curve" from "Key-Type: default".
May 20 2021, 12:07 PM · gnupg24, gnupg (gpg23)
werner added a comment to T5393: gnupg coverity static analysis reports.

Please note that *_error-from_syserror accesses system's errno which may be cleared by xfree.

May 20 2021, 9:09 AM · gnupg (gpg23), Bug Report

May 18 2021

gniibe added a comment to T5439: Bug of t-keydb.c.

Possibly, it keeps running at calibrate_s2k_count, for some reason.

May 18 2021, 4:00 AM · gnupg (gpg23)
gniibe added a comment to T5439: Bug of t-keydb.c.

I was wrong.

May 18 2021, 3:18 AM · gnupg (gpg23)

May 17 2021

znull added a comment to T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations.

It's not clear whether you are talking about PIN caching related to signing operations or decryption operations.

May 17 2021, 10:27 PM · gnupg24, yubikey, Bug Report
lbogdan added a comment to T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations.

Just got around to testing this on Linux, and I can confirm the same behavior: decryption PIN caching works on 2.2 and doesn't work on 2.3.

May 17 2021, 1:51 PM · gnupg24, yubikey, Bug Report
lbogdan renamed T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations from gpg-agent 2.3.1: PIN caching not working to gpg-agent 2.3.1: PIN caching not working for decrypt operations.
May 17 2021, 11:21 AM · gnupg24, yubikey, Bug Report
gniibe triaged T5439: Bug of t-keydb.c as Normal priority.
May 17 2021, 10:43 AM · gnupg (gpg23)
lbogdan added a comment to T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations.

@znull You can also fix the detection issue by building with ./configure --disable-ccid-driver, in which case you won't need the disable-ccid setting anymore.

May 17 2021, 10:10 AM · gnupg24, yubikey, Bug Report
lbogdan added a comment to T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations.

@ikloecker Sorry for not being clear, I was not aware different operations have different behaviors in regard to entering / caching the PIN.

May 17 2021, 9:59 AM · gnupg24, yubikey, Bug Report
ikloecker added a comment to T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations.

It's not clear whether you are talking about PIN caching related to signing operations or decryption operations.

May 17 2021, 9:22 AM · gnupg24, yubikey, Bug Report

May 15 2021

znull added a comment to T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations.

I just wanted to chime in that I've had exactly the same experience as @lbogdan: gnupg 2.3 stopped recognizing my yubikey entirely on MacOS until the T5415 workaround (disable-ccid). After that, pin caching was broken until I applied his patch to call-scd.c:548, which makes it work as before. Without these two changes the experience with gnupg 2.3 is degraded relative to 2.2.

May 15 2021, 8:17 PM · gnupg24, yubikey, Bug Report

May 14 2021

lbogdan added a comment to T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations.

So I did a bit more reading on smartcard PIN caching, and took a better look at the debug logging of gnupg 2.2, and learned that, indeed, the PIN is cached by the card and not by any one gnupg component.

May 14 2021, 6:44 PM · gnupg24, yubikey, Bug Report

May 12 2021

lbogdan added a comment to T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations.

Yes, I already linked to T5415, but that breaks YubiKey completely, and I fixed it with disable-ccid.

May 12 2021, 6:08 PM · gnupg24, yubikey, Bug Report
werner edited projects for T5436: gpg-agent 2.3.1: PIN caching not working for decrypt operations, added: gnupg (gpg23), MacOS; removed gpgagent.

The pincache is actually not what you think it is. It is only used to allow switching between different application on a Yubikey which reqieres a new VERIFY command after switching back to the first application the card. What you feel as caching is the state of the card, which usually keeps its verification state until the card is powered down.

May 12 2021, 5:52 PM · gnupg24, yubikey, Bug Report

May 11 2021

werner added a comment to T5430: "free(): invalid pointer" from --clearsign.

FWIW, we can and should run our test suite under valgrind from time to time

May 11 2021, 9:00 AM · gnupg (gpg23)
gniibe changed the status of T5430: "free(): invalid pointer" from --clearsign from Open to Testing.
May 11 2021, 8:43 AM · gnupg (gpg23)
werner triaged T5431: Use AC_PROG_CC_C99 as Normal priority.
May 11 2021, 8:23 AM · gnupg24, toolchain, gnupg (gpg23)
gniibe added a comment to T5430: "free(): invalid pointer" from --clearsign.

Sorry, it's my fault.
Fixed in rGac731dbbbd21: gpg: Fix allocation for EXTRAHASH..

May 11 2021, 7:50 AM · gnupg (gpg23)
gniibe added a comment to D531: Keep holding READER_LOCK_TABLE and make clear distinction among close/releasing_PCSC_context/nullify_rdrname.

Applied in rG32baa9acfb15: scd: Serialize READER_TABLE access for PC/SC..

May 11 2021, 3:42 AM · gnupg (gpg23), scd
gniibe added a comment to D531: Keep holding READER_LOCK_TABLE and make clear distinction among close/releasing_PCSC_context/nullify_rdrname.

Please note that we don't use lock in apdu_dev_list_start/finish any more.
Use of lock is narrowed, only within apdu_open_reader function.

May 11 2021, 3:41 AM · gnupg (gpg23), scd

May 10 2021

cbiedl created T5430: "free(): invalid pointer" from --clearsign.
May 10 2021, 9:27 PM · gnupg (gpg23)
werner added a comment to D531: Keep holding READER_LOCK_TABLE and make clear distinction among close/releasing_PCSC_context/nullify_rdrname.

We should add a comment at the caller side, that this takes a lock in apdu.c.

May 10 2021, 8:45 AM · gnupg (gpg23), scd
gniibe updated the diff for D531: Keep holding READER_LOCK_TABLE and make clear distinction among close/releasing_PCSC_context/nullify_rdrname.

Make the lock holding narrower, and it allows no exposing reader_table_lock.

May 10 2021, 7:52 AM · gnupg (gpg23), scd
gniibe added inline comments to D531: Keep holding READER_LOCK_TABLE and make clear distinction among close/releasing_PCSC_context/nullify_rdrname.
May 10 2021, 7:51 AM · gnupg (gpg23), scd
gniibe updated the diff for D531: Keep holding READER_LOCK_TABLE and make clear distinction among close/releasing_PCSC_context/nullify_rdrname.

Exposing reader_table_lock would be better.
I found a dead-lock condition when apdu_close_reader is called during apdu_dev_list_start/finish.

May 10 2021, 7:06 AM · gnupg (gpg23), scd
gniibe updated the diff for D531: Keep holding READER_LOCK_TABLE and make clear distinction among close/releasing_PCSC_context/nullify_rdrname.

And if the coding style of hiding mutex_lock/mutex_unlock inside different functions matters, we can expose the mutex to its user.

May 10 2021, 4:32 AM · gnupg (gpg23), scd
gniibe added a comment to D531: Keep holding READER_LOCK_TABLE and make clear distinction among close/releasing_PCSC_context/nullify_rdrname.

Last commit will be:

May 10 2021, 4:29 AM · gnupg (gpg23), scd
gniibe added a comment to D531: Keep holding READER_LOCK_TABLE and make clear distinction among close/releasing_PCSC_context/nullify_rdrname.

The second commit is replacing a use case of close_pcsc_reader by clearing pcsc.rdrname and calling release_pcsc_context.
This makes the use of close_pcsc_reader to its original purpose only (== closing PC/SC reader as a method of close_reader).

May 10 2021, 3:48 AM · gnupg (gpg23), scd
gniibe added a comment to D531: Keep holding READER_LOCK_TABLE and make clear distinction among close/releasing_PCSC_context/nullify_rdrname.

OK. As I pointed out a commit having multiple things may make analysis difficult, I should have been careful.
So, let me fix the problem by multiple commits.

May 10 2021, 3:28 AM · gnupg (gpg23), scd

May 7 2021

werner requested changes to D531: Keep holding READER_LOCK_TABLE and make clear distinction among close/releasing_PCSC_context/nullify_rdrname.

Keeping the lock over the call to the function does not look very robust to me. This is why I removed it. And since then PC/SC worked on Windows for me. Modulo this:
All these changes don't tackle the real problem that windows gets struck in a removed-card state.

May 7 2021, 8:36 AM · gnupg (gpg23), scd
colemickens added a comment to T5416: [windows] Smartcards are less reliable under 2.3.1 (requires restarting gpg-agent.exe).

Technical commentary on smartcard operation and/or Windows is going to be over my head, so I can't help (just in case you're looking for anything from me). But always happy to drive-test another build. (I've still had no issues, personally, with the build above.) I'll assume you don't need me unless you link another binary build to test or tag me. Thanks again, all.

May 7 2021, 7:22 AM · yubikey, scd, gnupg (gpg23), Bug Report
gniibe added a comment to T5416: [windows] Smartcards are less reliable under 2.3.1 (requires restarting gpg-agent.exe).

The problem is accesses to reader_table by
(1) scanning reader(s) to open new one
(2) closing reader

May 7 2021, 6:59 AM · yubikey, scd, gnupg (gpg23), Bug Report
gniibe added a comment to T5416: [windows] Smartcards are less reliable under 2.3.1 (requires restarting gpg-agent.exe).

I'm testing D531: Keep holding READER_LOCK_TABLE and make clear distinction among close/releasing_PCSC_context/nullify_rdrname, but I'm not sure about the impact on Windows.

May 7 2021, 6:54 AM · yubikey, scd, gnupg (gpg23), Bug Report
gniibe requested review of D531: Keep holding READER_LOCK_TABLE and make clear distinction among close/releasing_PCSC_context/nullify_rdrname.
May 7 2021, 6:51 AM · gnupg (gpg23), scd
gniibe reopened T5416: [windows] Smartcards are less reliable under 2.3.1 (requires restarting gpg-agent.exe) as "Open".

The commit rGbb8e3996e44f: scd: Fix problem with reader list becoming empty. removed READER_TABLE_LOCK holding between apdu_dev_list_start and apdu_dev_list_finish, that opens possible stale resource access for CCID driver: reader_table[slot].ccid.handle

May 7 2021, 6:34 AM · yubikey, scd, gnupg (gpg23), Bug Report

May 5 2021

werner closed T5416: [windows] Smartcards are less reliable under 2.3.1 (requires restarting gpg-agent.exe) as Resolved.

Thanks for testing. I hope to get 2.3.2 out in two weeks.

May 5 2021, 8:13 AM · yubikey, scd, gnupg (gpg23), Bug Report

May 4 2021

colemickens added a comment to T5416: [windows] Smartcards are less reliable under 2.3.1 (requires restarting gpg-agent.exe).

After upgrade:

May 4 2021, 8:08 PM · yubikey, scd, gnupg (gpg23), Bug Report

May 3 2021

werner added projects to T5416: [windows] Smartcards are less reliable under 2.3.1 (requires restarting gpg-agent.exe): gnupg (gpg23), scd, yubikey.

Meanwhile we did some more tests on Windows and so you many want to try our betas at

May 3 2021, 2:00 PM · yubikey, scd, gnupg (gpg23), Bug Report

Apr 27 2021

werner claimed T5412: Getting "Invalid digest algorithm", when trying to generate ECDH keys, in batch mode.
Apr 27 2021, 8:14 AM · FAQ, gnupg, OpenPGP

Apr 23 2021

gniibe closed T5408: gpgconf should? not list disabled components as Resolved.
Apr 23 2021, 4:20 AM · Bug Report, Windows, gnupg (gpg23)