From 76d955efa5fcd46fd325015d6cd3a389f8d9bb93 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 26 Jan 2014 05:17:34 +0100 Subject: Get rid of long_ago variable, use timeout helpers --- src/protocols/ec25519_fhmqvc/handshake.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/protocols/ec25519_fhmqvc/handshake.h') diff --git a/src/protocols/ec25519_fhmqvc/handshake.h b/src/protocols/ec25519_fhmqvc/handshake.h index 2929b2b..c6eadf9 100644 --- a/src/protocols/ec25519_fhmqvc/handshake.h +++ b/src/protocols/ec25519_fhmqvc/handshake.h @@ -45,11 +45,11 @@ struct fastd_protocol_state { static inline bool is_handshake_key_valid(fastd_context_t *ctx, const handshake_key_t *handshake_key) { - return timespec_after(&handshake_key->valid_till, &ctx->now); + return !fastd_timed_out(ctx, &handshake_key->valid_till); } static inline bool is_handshake_key_preferred(fastd_context_t *ctx, const handshake_key_t *handshake_key) { - return timespec_after(&handshake_key->preferred_till, &ctx->now); + return !fastd_timed_out(ctx, &handshake_key->preferred_till); } #endif /* _FASTD_PROTOCOL_EC25519_FHMQVC_HANDSHAKE_H_ */ -- cgit v1.2.3