passphrase callback

Werner Koch wk at gnupg.org
Thu May 28 09:02:11 CEST 2015


On Wed, 27 May 2015 23:07, folkert at vanheusden.com said:

> Found out that the documentation on the gnu website is no longer
> up-to-date and that I need to set the pin mode to loop-back:

gnu.org or gnupg.org - I have mot updated anything at gnu.org for quite
soem time.  However, all packages come with a reference manual.

> [pid 14558] write(2, "gpg: invalid option \"--pinentry-mode=loopback\"\n", 47) = 47
>
> This is a bit odd I would say?

No.  --pinentry-mode is a new feature of GnuPG 2.1 and the gpgme manual
does not yet document this new API.  You are using 2.0 which does not
provide pinentry-mode at all.

> On Wed, May 27, 2015 at 09:30:09PM +0200, folkert wrote:

>> I'm trying to use gpgme in an unattended environment, e.g. without user
>> interaction.
>> Now I try to use gpgme_set_passphrase_cb() and I find two issues:
>> - when I invoke it without the ctx beining setup, it silently
>>   ignores/fails

Sure, without a context gpgme can't store the callback.

>> - even though I set the passphrase callback, it still tries to invoke
>>   the gpg-agent gui. if I remove that program (as the situation will be
>>   on he server), it still doesn't use the passphrase callback

That depends on the configuraion of gpg 2.0 or 1.4.   IIRC< you need to
use no-use-agent in gpg.conf.


Salam-Shalom,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.




More information about the Gnupg-devel mailing list