|
@@ -441,7 +441,7 @@ add_an_entry_guard(const node_t *chosen, int reset_status, int prepend,
|
|
|
* precise timestamp in the state file about when we first picked
|
|
|
* this guard. For details, see the Jan 2010 or-dev thread. */
|
|
|
time_t now = time(NULL);
|
|
|
- entry->chosen_on_date = crypto_rand_int_range(now - 3600*24*30, now);
|
|
|
+ entry->chosen_on_date = crypto_rand_time_range(now - 3600*24*30, now);
|
|
|
entry->chosen_by_version = tor_strdup(VERSION);
|
|
|
|
|
|
|
|
@@ -1441,7 +1441,7 @@ entry_guards_parse_state(or_state_t *state, int set, char **msg)
|
|
|
} else {
|
|
|
if (state_version) {
|
|
|
time_t now = time(NULL);
|
|
|
- e->chosen_on_date = crypto_rand_int_range(now - 3600*24*30, now);
|
|
|
+ e->chosen_on_date = crypto_rand_time_range(now - 3600*24*30, now);
|
|
|
e->chosen_by_version = tor_strdup(state_version);
|
|
|
}
|
|
|
}
|