Don't prompt for the password multiple times in pinentry loopback mode.
authorNeal H. Walfield <neal@g10code.com>
Tue, 16 Jun 2015 14:00:39 +0000 (16:00 +0200)
committerNeal H. Walfield <neal@g10code.com>
Tue, 16 Jun 2015 14:00:39 +0000 (16:00 +0200)
* g10/gpg.c (main): If OPT.PINENTRY_MODE is PINENTRY_MODE_LOOPBACK,
clear OPT.PASSPHRASE_REPEAT.

g10/gpg.c

index 1801c87..5eae240 100644 (file)
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -3531,6 +3531,13 @@ main (int argc, char **argv)
       }
     FREE_STRLIST(nrings);
 
+    if (opt.pinentry_mode == PINENTRY_MODE_LOOPBACK)
+      /* In loopback mode, never ask for the password multiple
+        times.  */
+      {
+       opt.passphrase_repeat = 0;
+      }
+
     if (cmd == aGPGConfTest)
       g10_exit(0);