summaryrefslogtreecommitdiffstats
path: root/src/protocols/ec25519_fhmqvc/handshake.h
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-01-26 05:17:34 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-01-26 05:17:34 +0100
commit76d955efa5fcd46fd325015d6cd3a389f8d9bb93 (patch)
tree69956b73a9ca9f692a5a95759eb7dedffea62e12 /src/protocols/ec25519_fhmqvc/handshake.h
parent9fe7f35ce87dceb368c7ddffd7f6902dca24b97a (diff)
downloadfastd-76d955efa5fcd46fd325015d6cd3a389f8d9bb93.tar
fastd-76d955efa5fcd46fd325015d6cd3a389f8d9bb93.zip
Get rid of long_ago variable, use timeout helpers
Diffstat (limited to 'src/protocols/ec25519_fhmqvc/handshake.h')
-rw-r--r--src/protocols/ec25519_fhmqvc/handshake.h4
1 files changed, 2 insertions, 2 deletions
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_ */