From 8c55c26189734a06ac2f58fbdd6078485ff1c657 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Mon, 21 May 2018 16:33:23 +0100 Subject: [PATCH] Set pinentry mode to GPGME_PINENTRY_MODE_LOOPBACK This allows passphrase callback mechanism in GnuPG 2.1+ --- gnupg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gnupg.c b/gnupg.c index 57f50e8..e918096 100644 --- a/gnupg.c +++ b/gnupg.c @@ -170,6 +170,7 @@ static void php_gnupg_this_make(PHPC_THIS_DECLARE(gnupg), zval *options TSRMLS_D ctx, GPGME_PROTOCOL_OpenPGP, file_name, home_dir); } gpgme_set_armor(ctx, 1); + gpgme_set_pinentry_mode(ctx, GPGME_PINENTRY_MODE_LOOPBACK); } } /* }}} */