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.
This commit is contained in:
Nick Mathewson
2013-09-18 11:09:34 -04:00
parent accadd8752
commit fd2954d06d
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -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.
+1
View File
@@ -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);