mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
prop224: API for the creation of blinded keys
Add a function for both the client and service side that is building a blinded key from a keypair (service) and from a public key (client). Those two functions uses the current time period information to build the key. Signed-off-by: David Goulet <dgoulet@torproject.org>
This commit is contained in:
committed by
Nick Mathewson
parent
44e3255c4d
commit
9052530bdd
@@ -330,18 +330,18 @@ test_time_period(void *arg)
|
||||
tt_int_op(retval, ==, 0);
|
||||
|
||||
/* Check that the time period number is right */
|
||||
tn = get_time_period_num(fake_time);
|
||||
tn = hs_get_time_period_num(fake_time);
|
||||
tt_u64_op(tn, ==, 16903);
|
||||
|
||||
/* Increase current time to 11:59:59 UTC and check that the time period
|
||||
number is still the same */
|
||||
fake_time += 3599;
|
||||
tn = get_time_period_num(fake_time);
|
||||
tn = hs_get_time_period_num(fake_time);
|
||||
tt_u64_op(tn, ==, 16903);
|
||||
|
||||
/* Now take time to 12:00:00 UTC and check that the time period rotated */
|
||||
fake_time += 1;
|
||||
tn = get_time_period_num(fake_time);
|
||||
tn = hs_get_time_period_num(fake_time);
|
||||
tt_u64_op(tn, ==, 16904);
|
||||
|
||||
/* Now also check our hs_get_next_time_period_num() function */
|
||||
|
||||
Reference in New Issue
Block a user