Fix gpg_addkey() to work with GPGME_CREATE_NOPASSWD as well.
authorBen Kibbey <bjk@luxsci.net>
Sat, 31 Dec 2016 23:09:49 +0000 (18:09 -0500)
committerBen Kibbey <bjk@luxsci.net>
Sat, 31 Dec 2016 23:09:49 +0000 (18:09 -0500)
* src/engine-gpg.c (gpg_addkey): Pass --batch to gpg when
GPGME_CREATE_NOPASSWD is set to fix pinentry without loopback mode.

--
Signed-off-by: Ben Kibbey <bjk@luxsci.net>
src/engine-gpg.c

index 1b0e4c9..75ba4bd 100644 (file)
@@ -2176,6 +2176,8 @@ gpg_addkey (engine_gpg_t gpg,
       err = add_arg (gpg, "--passphrase");
       if (!err)
         err = add_arg (gpg, "");
+      if (!err)
+        err = add_arg (gpg, "--batch");
     }
   if (!err)
     err = add_arg (gpg, "--");