GPGME: gpgme_get_key bug
Giacomo Tesio
giacomo at tesio.it
Sat Nov 8 15:29:09 CET 2025
Hi, while working on a patch for Claws-Mail, I realized that
gpgme_get_key ignores context configuration set with either
gpgme_set_ctx_flag or gpgme_set_offline.
Looking at the source code in gpgme/src/keylist.c, I saw that a new
listctx is created "to avoid the user's I/O callback handlers" and
part of the calling ctx's configuration is copied there.
However, imho, at least "auto-key-locate" ctx flag and offline mode
should be copied too, to actually serve the caller's request, as
they may impact the key retrieval.
You can find a patch attached.
Cheers,
Giacomo
PS: I tried to report this on bugzilla, but the registration page
suggest to ask here for credentials. Feel free to use "giacomo" as
handle, "Giacomo Tesio" as shown name, and this address as email.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-gpgme_get_key-respect-caller-s-ctx-configuration.patch
Type: text/x-patch
Size: 1150 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gnupg-devel/attachments/20251108/363534fb/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: Firma digitale OpenPGP
URL: <https://lists.gnupg.org/pipermail/gnupg-devel/attachments/20251108/363534fb/attachment-0001.sig>
More information about the Gnupg-devel
mailing list