/* -*-c-*-
*
- * $Id: keyexch.c,v 1.5 2002/01/13 14:54:40 mdw Exp $
+ * $Id: keyexch.c,v 1.7 2003/05/17 11:01:28 mdw Exp $
*
* Key exchange protocol
*
/*----- Revision history --------------------------------------------------*
*
* $Log: keyexch.c,v $
+ * Revision 1.7 2003/05/17 11:01:28 mdw
+ * Handle flags on challenge timers correctly to prevent confusing the event
+ * list.
+ *
+ * Revision 1.6 2003/04/06 10:26:35 mdw
+ * Report peer name on decrypt errors.
+ *
* Revision 1.5 2002/01/13 14:54:40 mdw
* Patch up zero-knowledge property by passing an encrypted log with a
* challenge, so that the prover can verify that the challenge is good.
/*----- Tunable parameters ------------------------------------------------*/
-#define T_VALID MIN(2)
-#define T_RETRY SEC(10)
+#define T_VALID MIN(2) /* Challenge validity period */
+#define T_RETRY SEC(10) /* Challenge retransmit interval */
#define ISVALID(kx, now) ((now) < (kx)->t_valid)
{
if (kxc->f & KXF_TIMER)
sel_rmtimer(&kxc->t);
+ kxc->f &= ~KXF_TIMER;
}
/* --- @kxc_new@ --- *
buf_putmp(b, r); z = BLEN(b);
assert(BOK(b));
- kxc->ks = ks_gen(BBASE(b), x, y, z);
+ kxc->ks = ks_gen(BBASE(b), x, y, z, kx->p);
mp_drop(r);
}