gnupg-2.1.x, GPG_AGENT_INFO, claws-mail

Robby Workman robby at
Fri Jan 2 09:16:01 CET 2015

Since gnupg-2.1.x no longer pays attention to (or even sets) the
GPG_AGENT_INFO variable in the environment, there's a bit of a
problem in claws-mail's usage of the gpg-agent.  Claws allows the
user to let gpg-agent handle passphrases for e.g. mail signing,
encryption, etcetera, or else it will handle it internally.

The check for whether to offer gpg-agent use in its preferences
is wrapped in a check for GPG_AGENT_INFO in the environment, i.e.
if it's unset, then there's not even an option to allow use of 
gpg-agent. At runtime, even if the preference is set to use the
gpg-agent, if GPG_AGENT_INFO is not set, then it will automatically
fall back to the internal handling.

I'm guessing that claws (is not|will not) be the only application
broken in this or a similar fashion, so...

1. How feasible would it be to restore the setting of GPG_AGENT_INFO
   in the environment by gnupg-2.1.x? In other words, populate it on
   startup as in the past to provide a seamless transition for users?

2. Assuming #1 is nixed, what would the suggested way of dealing with
   this be? Keep in mind that both the "old" gnupg and gnupg-2.1.x
   implementations have to be supported - is there a good way of 
   querying this at runtime using some gnupg API?


More information about the Gnupg-devel mailing list