diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-09-18 11:09:34 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-09-20 11:00:27 -0400 |
commit | fd2954d06d2e9b8b0d33bcd0a2e3dfb947ff662e (patch) | |
tree | 2381c98d6895a6830ecd4617c07bea2ca83526d9 | |
parent | accadd8752bb26efeb31a5c866a16cc863963893 (diff) | |
download | tor-fd2954d06d2e9b8b0d33bcd0a2e3dfb947ff662e.tar tor-fd2954d06d2e9b8b0d33bcd0a2e3dfb947ff662e.tar.gz |
Round down hidden service descriptor publication times to nearest hour
Implements part of proposal 222. We can do this safely, since
REND_CACHE_MAX_SKEW is 24 hours.
-rw-r--r-- | changes/no_client_timestamps_024 | 2 | ||||
-rw-r--r-- | src/or/rendservice.c | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/changes/no_client_timestamps_024 b/changes/no_client_timestamps_024 index 9ded8b3d9..488630fb3 100644 --- a/changes/no_client_timestamps_024 +++ b/changes/no_client_timestamps_024 @@ -10,3 +10,5 @@ - Stop sending timestamps in AUTHENTICATE cells. This is not such a big deal from a security point of view, but it achieves no actual good purpose, and isn't needed. Implements part of proposal 222. + - Reduce down accuracy of timestamps in hidden service descriptors. + Implements part of proposal 222. diff --git a/src/or/rendservice.c b/src/or/rendservice.c index 00bca17d4..8a4a11e47 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -593,6 +593,7 @@ rend_service_update_descriptor(rend_service_t *service) d = service->desc = tor_malloc_zero(sizeof(rend_service_descriptor_t)); d->pk = crypto_pk_dup_key(service->private_key); d->timestamp = time(NULL); + d->timestamp -= d->timestamp % 3600; /* Round down to nearest hour */ d->intro_nodes = smartlist_new(); /* Support intro protocols 2 and 3. */ d->protocols = (1 << 2) + (1 << 3); |