diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-03-17 11:16:24 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-03-17 11:16:24 -0400 |
commit | 58680d04299ab69ea99ee86c5f1a194f44fc1d12 (patch) | |
tree | 814c4ebcbd458585695ec1d3e66c7c78a93e77ff /src/or/or.h | |
parent | 6657fe1e54743e90e33c453de154343fbf94bad4 (diff) | |
parent | 946ccf3e4de883b98aa62666b8a5bdc3eb535447 (diff) | |
download | tor-58680d04299ab69ea99ee86c5f1a194f44fc1d12.tar.gz tor-58680d04299ab69ea99ee86c5f1a194f44fc1d12.zip |
Merge branch 'ahf_bugs_21641_squashed'
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/or/or.h b/src/or/or.h index 476cc384b9..9b0ccaffa0 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -147,8 +147,27 @@ /** Maximum size of a single extrainfo document, as above. */ #define MAX_EXTRAINFO_UPLOAD_SIZE 50000 -/** How often do we rotate onion keys? */ -#define MIN_ONION_KEY_LIFETIME (7*24*60*60) +/** Minimum lifetime for an onion key in days. */ +#define MIN_ONION_KEY_LIFETIME_DAYS (1) + +/** Maximum lifetime for an onion key in days. */ +#define MAX_ONION_KEY_LIFETIME_DAYS (90) + +/** Default lifetime for an onion key in days. */ +#define DEFAULT_ONION_KEY_LIFETIME_DAYS (28) + +/** Minimum grace period for acceptance of an onion key in days. + * The maximum value is defined in proposal #274 as being the current network + * consensus parameter for "onion-key-rotation-days". */ +#define MIN_ONION_KEY_GRACE_PERIOD_DAYS (1) + +/** Default grace period for acceptance of an onion key in days. */ +#define DEFAULT_ONION_KEY_GRACE_PERIOD_DAYS (7) + +/** How often we should check the network consensus if it is time to rotate or + * expire onion keys. */ +#define ONION_KEY_CONSENSUS_CHECK_INTERVAL (60*60) + /** How often do we rotate TLS contexts? */ #define MAX_SSL_KEY_LIFETIME_INTERNAL (2*60*60) |