/* -*-c-*-
*
- * $Id: passphrase.c,v 1.4 2001/04/19 18:26:01 mdw Exp $
+ * $Id: passphrase.c,v 1.5 2002/01/13 13:41:37 mdw Exp $
*
* Reading of passphrases (Unix-specific)
*
/*----- Revision history --------------------------------------------------*
*
* $Log: passphrase.c,v $
+ * Revision 1.5 2002/01/13 13:41:37 mdw
+ * Fix stupidity in passphrase verification.
+ *
* Revision 1.4 2001/04/19 18:26:01 mdw
* Re-request broken passphrases.
*
/* --- Read from the terminal --- */
-again:
dstr_putf(&d, "%s %s: ",
mode == PMODE_READ ? "Passphrase" : "New passphrase",
tag);
char b[1024];
DRESET(&d);
dstr_putf(&d, "Verify passphrase %s: ", tag);
- if (pixie_getpass(d.buf, b, sizeof(b)) ||
- strcmp(b, buf) != 0) {
+ if (pixie_getpass(d.buf, b, sizeof(b)) || strcmp(b, buf) != 0) {
memset(b, 0, sizeof(b));
+ goto fail;
}
}
dstr_destroy(&d);