X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/tripe/blobdiff_plain/12a26b8b34df23103d4da6d7e40705485266a4d6..e9fac70c8cff251871c8177e7578f8ed055b7fc7:/server/keyexch.c diff --git a/server/keyexch.c b/server/keyexch.c index 8eaf1e88..65dd037f 100644 --- a/server/keyexch.c +++ b/server/keyexch.c @@ -75,13 +75,6 @@ * Switch received. Committed; send data; move to @KXS_SWITCH@. */ -/*----- Tunable parameters ------------------------------------------------*/ - -#define T_VALID SEC(20) /* Challenge validity period */ -#define T_RETRY SEC(10) /* Challenge retransmit interval */ - -#define VALIDP(kx, now) ((now) < (kx)->t_valid) - /*----- Static tables -----------------------------------------------------*/ static const char *const pkname[] = { @@ -90,6 +83,17 @@ static const char *const pkname[] = { /*----- Various utilities -------------------------------------------------*/ +/* --- @VALIDP@ --- * + * + * Arguments: @const keyexch *kx@ = key exchange state + * @time_t now@ = current time in seconds + * + * Returns: Whether the challenge in the key-exchange state is still + * valid or should be regenerated. + */ + +#define VALIDP(kx, now) ((now) < (kx)->t_valid) + /* --- @hashge@ --- * * * Arguments: @ghash *h@ = pointer to hash context