diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-11-03 08:44:46 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-11-03 08:44:46 -0400 |
commit | d9ca4e20bd51915317c7bda38ef56c67499f6f5e (patch) | |
tree | 992d25548574cbe67a0c1fb791b12f24997be2b8 /src/or/routerparse.c | |
parent | 25f53955f6d4fd85a7a1a50484a62d18dfa96524 (diff) | |
parent | f156156d56ec61394eb814397c33557762870809 (diff) | |
download | tor-d9ca4e20bd51915317c7bda38ef56c67499f6f5e.tar.gz tor-d9ca4e20bd51915317c7bda38ef56c67499f6f5e.zip |
Merge branch 'feature_15055_v2'
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r-- | src/or/routerparse.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 7f7d38234d..cb2bc72d0c 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -2100,12 +2100,13 @@ router_parse_entry_from_string(const char *s, const char *end, ed25519_checkable_t check[3]; int check_ok[3]; - if (tor_cert_get_checkable_sig(&check[0], cert, NULL) < 0) { + time_t expires = TIME_MAX; + if (tor_cert_get_checkable_sig(&check[0], cert, NULL, &expires) < 0) { log_err(LD_BUG, "Couldn't create 'checkable' for cert."); goto err; } if (tor_cert_get_checkable_sig(&check[1], - ntor_cc_cert, &ntor_cc_pk) < 0) { + ntor_cc_cert, &ntor_cc_pk, &expires) < 0) { log_err(LD_BUG, "Couldn't create 'checkable' for ntor_cc_cert."); goto err; } @@ -2135,10 +2136,7 @@ router_parse_entry_from_string(const char *s, const char *end, } /* We check this before adding it to the routerlist. */ - if (cert->valid_until < ntor_cc_cert->valid_until) - router->cert_expiration_time = cert->valid_until; - else - router->cert_expiration_time = ntor_cc_cert->valid_until; + router->cert_expiration_time = expires; } } @@ -2452,7 +2450,7 @@ extrainfo_parse_entry_from_string(const char *s, const char *end, ed25519_checkable_t check[2]; int check_ok[2]; - if (tor_cert_get_checkable_sig(&check[0], cert, NULL) < 0) { + if (tor_cert_get_checkable_sig(&check[0], cert, NULL, NULL) < 0) { log_err(LD_BUG, "Couldn't create 'checkable' for cert."); goto err; } |