summaryrefslogtreecommitdiffstats
path: root/src/protocols/ec25519_fhmqvc/handshake.h
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-08-24 16:07:50 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-08-24 16:07:50 +0200
commit1ae3aae35193dce25e5534b12a46011ec7912bb4 (patch)
tree85d452b2a9cc23f081de7b2f3054801d6d9ea554 /src/protocols/ec25519_fhmqvc/handshake.h
parent4c0623a080c77ed54fa9fec47c2ab982385cb9a9 (diff)
downloadfastd-1ae3aae35193dce25e5534b12a46011ec7912bb4.tar
fastd-1ae3aae35193dce25e5534b12a46011ec7912bb4.zip
Use simple int64_t timestamps in ms instead of timespecs
Diffstat (limited to 'src/protocols/ec25519_fhmqvc/handshake.h')
-rw-r--r--src/protocols/ec25519_fhmqvc/handshake.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/protocols/ec25519_fhmqvc/handshake.h b/src/protocols/ec25519_fhmqvc/handshake.h
index a05e542..7779858 100644
--- a/src/protocols/ec25519_fhmqvc/handshake.h
+++ b/src/protocols/ec25519_fhmqvc/handshake.h
@@ -50,8 +50,8 @@ typedef struct handshake_key {
*/
uint64_t serial;
- struct timespec preferred_till; /**< Specifies how long this keypair will be used for new handshakes */
- struct timespec valid_till; /**< Specifies how long handshakes using this keypair will be answered */
+ fastd_timeout_t preferred_till; /**< Specifies how long this keypair will be used for new handshakes */
+ fastd_timeout_t valid_till; /**< Specifies how long handshakes using this keypair will be answered */
keypair_t key; /**< The actual keypair */
} handshake_key_t;
@@ -69,10 +69,10 @@ struct fastd_protocol_state {
/** Checks if a handshake keypair is currently valid */
static inline bool is_handshake_key_valid(const handshake_key_t *handshake_key) {
- return !fastd_timed_out(&handshake_key->valid_till);
+ return !fastd_timed_out(handshake_key->valid_till);
}
/** Checks if a handshake keypair is currently peferred */
static inline bool is_handshake_key_preferred(const handshake_key_t *handshake_key) {
- return !fastd_timed_out(&handshake_key->preferred_till);
+ return !fastd_timed_out(handshake_key->preferred_till);
}