/* -*-c-*-
*
- * $Id: passphrase.c,v 1.2 2000/06/17 11:49:37 mdw Exp $
+ * $Id: passphrase.c,v 1.4 2001/04/19 18:26:01 mdw Exp $
*
* Reading of passphrases (Unix-specific)
*
/*----- Revision history --------------------------------------------------*
*
* $Log: passphrase.c,v $
+ * Revision 1.4 2001/04/19 18:26:01 mdw
+ * Re-request broken passphrases.
+ *
+ * Revision 1.3 2000/12/06 20:33:27 mdw
+ * Make flags be macros rather than enumerations, to ensure that they're
+ * unsigned.
+ *
* Revision 1.2 2000/06/17 11:49:37 mdw
* New pixie protocol allowing application to request passphrases and send
* them to the pixie.
static int fd = -1;
static unsigned flags = 0;
-enum {
- f_fail = 1
-};
+#define f_fail 1u
/*----- Main code ---------------------------------------------------------*/
/* --- Read from the terminal --- */
+again:
dstr_putf(&d, "%s %s: ",
mode == PMODE_READ ? "Passphrase" : "New passphrase",
tag);
if (pixie_getpass(d.buf, b, sizeof(b)) ||
strcmp(b, buf) != 0) {
memset(b, 0, sizeof(b));
- goto fail;
}
}
dstr_destroy(&d);