diff options
author | Alexander Færøy <ahf@torproject.org> | 2017-03-10 12:18:52 +0100 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-03-17 11:15:43 -0400 |
commit | 23ae5b655b9d94d62c6c9296cb8cc2b33ae345d7 (patch) | |
tree | bcd27dc338a8c1473b0f5be5d8436ff863bfead8 /src/test/test_dir.c | |
parent | 85dccce35db907221df38da7bd789f28f7d1e2f9 (diff) | |
download | tor-23ae5b655b9d94d62c6c9296cb8cc2b33ae345d7.tar.gz tor-23ae5b655b9d94d62c6c9296cb8cc2b33ae345d7.zip |
Make MIN_ONION_KEY_LIFETIME a consensus parameter defined value.
This patch turns `MIN_ONION_KEY_LIFETIME` into a new function
`get_onion_key_lifetime()` which gets its value from a network consensus
parameter named "onion-key-rotation-days". This allows us to tune the
value at a later point in time with no code modifications.
We also bump the default onion key lifetime from 7 to 28 days as per
proposal #274.
See: https://bugs.torproject.org/21641
Diffstat (limited to 'src/test/test_dir.c')
-rw-r--r-- | src/test/test_dir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test_dir.c b/src/test/test_dir.c index 3906206696..91d6af9ce2 100644 --- a/src/test/test_dir.c +++ b/src/test/test_dir.c @@ -329,7 +329,7 @@ test_dir_formats(void *arg) ntor_cc = make_ntor_onion_key_crosscert(&r2_onion_keypair, &kp1.pubkey, r2->cache_info.published_on, - MIN_ONION_KEY_LIFETIME, + get_onion_key_lifetime(), &ntor_cc_sign); tt_assert(ntor_cc); base64_encode(cert_buf, sizeof(cert_buf), |