Page MenuHome GnuPG

GPGME: Finding gpgme-w32-spawn.exe should be optional
Open, NormalPublic

Description

At some point back in 2016 i thought that I should add a developer warning if gpgme.dll does not find gpgme-w32-spawn.exe In hindsight this seems wrong since GnuPG should be fully optional and looked for using the mechanisms in w32-util.c _gpgme_get_gpgconf_path I think the problem is that to find the main GnuPG installation we would then need to spawn Gpgconf. But if no Gpgconf is found then we also cannot spawn. So we should probably take a gpgme-w32-spawn.exe that is found in the same place as we look for gpgconf.

Basically we should revert https://dev.gnupg.org/rM9cf983b0199950c8f8cccee2cb8e45aafcba9fd1 and ensure that gpgme-w32-spawn.exe is then found trough a similar mechanism which now looks for gpgconf.

Event Timeline

aheinecke created this task.

I'd prefer to not use the spawn helper at all. All currrent Windows versions allow to decide which handles are to be inherited and thus there is no more need for the helper.

gniibe added a subscriber: gniibe.

In future, when spawn function API is used by libassuan (and stable), we can support gpgme with no gpgme-w32-spawn.exe.
(And it will be simpler, just using native functions in libassuan, instead of replacing ones by assuan_system_hooks.)

However, since the changes of implementation will be a bit large, we should be conservative to introduce this kind of move.

For a while, as Werner suggests, let us only enable new way when and only when gpgme-w32-spawn.exe is not in the system.