#include "tripe.h"
-/*----- Tunable parameters ------------------------------------------------*/
-
-#define T_EXP MIN(60) /* Expiry time for a key */
-#define T_REGEN MIN(45) /* Regeneration time for a key */
-
/*----- Handy macros ------------------------------------------------------*/
#define KEYOK(ks, now) ((ks)->sz_exp > 0 && (ks)->t_exp > now)
GH_HASH(h, t, sizeof(t));
GH_HASH(h, pseq, SEQSZ + ivsz + sz);
mac = GH_DONE(h, 0);
- eq = !memcmp(mac, pmac, tagsz);
+ eq = ct_memeq(mac, pmac, tagsz);
IF_TRACING(T_KEYSET, {
trace_block(T_CRYPTO, "crypto: computed MAC", mac, tagsz);
})
return (ks);
}
-/* --- @ks_tregen@ --- *
- *
- * Arguments: @keyset *ks@ = pointer to a keyset
- *
- * Returns: The time at which moves ought to be made to replace this key.
- */
-
-time_t ks_tregen(keyset *ks) { return (ks->t_exp - T_EXP + T_REGEN); }
-
/* --- @ks_activate@ --- *
*
* Arguments: @keyset *ks@ = pointer to a keyset