summaryrefslogtreecommitdiff
path: root/src/or/hs_descriptor.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2017-09-05 15:52:05 -0400
committerGeorge Kadianakis <desnacked@riseup.net>2017-09-08 19:07:00 +0300
commitcd07af60c9e73e16034870ee1d03f729c1f2dd98 (patch)
treee47840ac1eeb0995f2b0adcd4cc6db75580bb709 /src/or/hs_descriptor.h
parentb586de78e37425c3f4b79fb0da32971ed5216401 (diff)
downloadtor-cd07af60c9e73e16034870ee1d03f729c1f2dd98.tar.gz
tor-cd07af60c9e73e16034870ee1d03f729c1f2dd98.zip
prop224: Expand the overlap period concept to be a full SRV protocol run
Because of #23387, we've realized that there is one scenario that makes the client unable to reach the service because of a desynch in the time period used. The scenario is as follows: +------------------------------------------------------------------+ | | | 00:00 12:00 00:00 12:00 00:00 12:00 | | SRV#1 TP#1 SRV#2 TP#2 SRV#3 TP#3 | | | | $==========|-----------$===========|-----------$===========| | | ^ ^ | | C S | +------------------------------------------------------------------+ In this scenario the HS has a newer consensus than the client, and the HS just moved to the next TP but the client is still stuck on the old one. However, the service is not in any sort of overlap mode so it doesn't cover the old TP anymore, so the client is unable to fetch a descriptor. We've decided to solve this by extending the concept of overlap period to be permanent so that the service always publishes two descriptors and aims to cover clients with both older and newer consensuses. See the spec patch in #23387 for more details.
Diffstat (limited to 'src/or/hs_descriptor.h')
-rw-r--r--src/or/hs_descriptor.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/or/hs_descriptor.h b/src/or/hs_descriptor.h
index 3e82746c35..61e7a28c2e 100644
--- a/src/or/hs_descriptor.h
+++ b/src/or/hs_descriptor.h
@@ -33,8 +33,11 @@ struct link_specifier_t;
* which is 720 minutes or 43200 seconds. */
#define HS_DESC_MAX_LIFETIME (12 * 60 * 60)
/* Lifetime of certificate in the descriptor. This defines the lifetime of the
- * descriptor signing key and the cross certification cert of that key. */
-#define HS_DESC_CERT_LIFETIME (36 * 60 * 60)
+ * descriptor signing key and the cross certification cert of that key. It is
+ * set to 54 hours because a descriptor can be around for 48 hours and because
+ * consensuses are used after the hour, add an extra 6 hours to give some time
+ * for the service to stop using it. */
+#define HS_DESC_CERT_LIFETIME (54 * 60 * 60)
/* Length of the salt needed for the encrypted section of a descriptor. */
#define HS_DESC_ENCRYPTED_SALT_LEN 16
/* Length of the secret input needed for the KDF construction which derives