tty: Correctly implement the repeat passphrase functionality.
authorNeal H. Walfield <neal@gnu.org>
Tue, 11 Aug 2015 12:26:26 +0000 (14:26 +0200)
committerNeal H. Walfield <neal@gnu.org>
Tue, 11 Aug 2015 12:26:55 +0000 (14:26 +0200)
* tty/pinentry-tty.c (password): If the user repeated the passphrase
and they matched, then set PINENTRY->REPEAT_OKAY.

tty/pinentry-tty.c

index 4315430..edec16f 100644 (file)
@@ -377,7 +377,10 @@ password (pinentry_t pinentry, FILE *ttyfi, FILE *ttyfo)
            }
 
          if (strcmp (passphrase, passphrase2) == 0)
-           done = 1;
+           {
+             pinentry->repeat_okay = 1;
+             done = 1;
+           }
          else
            fprintf (ttyfo, "*** %s%s%s ***\n",
                     ALERT_START,