Is gpgme_set_passphrase_cb effectively deprecated?

Jeroen Ooms jeroen at berkeley.edu
Thu Jan 3 16:51:08 CET 2019


I maintain the gpgme bindings for the R programming language, and we
use a have a custom password entry dialog in the GUI application.
IIRC, the following code used to work about 2 or 3 years ago:

  gpgme_set_pinentry_mode(ctx, GPGME_PINENTRY_MODE_LOOPBACK);
  gpgme_set_passphrase_cb(ctx, cb_fun, payload);

However I tried this with gpgme 1.11 (Windows) and 1.12 (MacOS), and
this does not seem to work anymore at all. The cb_fun is never
invoked, neither with gpg 1.4 nor gpg 2.2.

Some old posts on this mailing lists suggest that this is expected
because not all versions of gpg support loopback, but I am not sure if
this info is up to date.

Also the documentation for gpgme_set_passphrase_cb says "Some engines
do not even support an external passphrase callback at all, in this
case the error code GPG_ERR_NOT_SUPPORTED is returned" however the
function returns void so this seems incorrect.

I was wondering if it is possible to update the
gpgme_set_passphrase_cb documentation on the current situation, which
versions of gnupg it is expected to work, under which
conditions/settings.



More information about the Gnupg-devel mailing list