X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/tripe/blobdiff_plain/5d418e241860be38becfa5450ac65f9a8cc5865a..595935b74ae42e611ed689103cfba8659a7c27ea:/keyexch.c diff --git a/keyexch.c b/keyexch.c index be7b2a35..f2ea62b1 100644 --- a/keyexch.c +++ b/keyexch.c @@ -1,6 +1,6 @@ /* -*-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 * @@ -29,6 +29,13 @@ /*----- 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. @@ -53,8 +60,8 @@ /*----- 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) @@ -194,6 +201,7 @@ static void kxc_stoptimer(kxchal *kxc) { if (kxc->f & KXF_TIMER) sel_rmtimer(&kxc->t); + kxc->f &= ~KXF_TIMER; } /* --- @kxc_new@ --- * @@ -545,7 +553,7 @@ static int dochallenge(keyexch *kx, unsigned msg, buf *b) 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); }