summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/or/dirvote.c2
-rw-r--r--src/or/networkstatus.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/or/dirvote.c b/src/or/dirvote.c
index 07bbb159b9..c3ab6bda1c 100644
--- a/src/or/dirvote.c
+++ b/src/or/dirvote.c
@@ -1576,7 +1576,7 @@ dirvote_perform_vote(void)
if (!cert || !key) {
log_warn(LD_NET, "Didn't find key/certificate to generate v3 vote");
return -1;
- } else if (now < cert->expires) {
+ } else if (cert->expires < now) {
log_warn(LD_NET, "Can't generate v3 vote with expired certificate");
return -1;
}
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c
index 6458d0c04a..b1cd2eeab8 100644
--- a/src/or/networkstatus.c
+++ b/src/or/networkstatus.c
@@ -404,7 +404,7 @@ networkstatus_check_consensus_signature(networkstatus_t *consensus,
smartlist_add(unrecognized, voter);
++n_unknown;
continue;
- } else if (!cert || now > cert->expires) {
+ } else if (!cert || cert->expires < now) {
smartlist_add(need_certs_from, voter);
++n_missing_key;
continue;