summaryrefslogtreecommitdiff
path: root/src/or/hs_cache.h
AgeCommit message (Collapse)Author
2018-07-05Move literally everything out of src/orNick Mathewson
This commit won't build yet -- it just puts everything in a slightly more logical place. The reasoning here is that "src/core" will hold the stuff that every (or nearly every) tor instance will need in order to do onion routing. Other features (including some necessary ones) will live in "src/feature". The "src/app" directory will hold the stuff needed to have Tor be an application you can actually run. This commit DOES NOT refactor the former contents of src/or into a logical set of acyclic libraries, or change any code at all. That will have to come in the future. We will continue to move things around and split them in the future, but I hope this lays a reasonable groundwork for doing so.
2018-07-01Minimize headers that include crypto_formats and x25519 stuffNick Mathewson
2018-06-21Rectify include paths (automated)Nick Mathewson
2018-06-20Run rectify_include_paths.pyNick Mathewson
2018-06-20Update copyrights to 2018.Nick Mathewson
2018-04-06refactor: Remove unnecessary `#include "crypto.h"` throughout codebase.Isis Lovecruft
* FIXES part of #24658: https://bugs.torproject.org/24658
2017-11-20hs-v3: Add an encoded descriptor client cache lookup functionDavid Goulet
This commit adds hs_cache_lookup_encoded_as_client() function that returns the encoded descriptor for a given service public key. This will be needed by the "GETINFO hs/client/desc/id/<ADDR>" control port command. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15Run our #else/#endif annotator on our source code.Nick Mathewson
2017-09-13prop224: Set stricter expiration time of cached client descriptors.George Kadianakis
In #23466 we discovered that cached descriptors can stay around on the client-side for up to 72 hours. In reality we only want those descs to get cached for the duration of the current time period, since after that TP is gone the client needs to compute a new blinded key to use for the HS. In this commit we start using the consensus time (if available) when cleaning up cached client descriptor entries. That makes sense because the client uses consensus time anyway for connecting to hidden services (e.g. computing blinded keys and time periods). If no recent consensus is available, we consider descriptors to be expired since we will want to fetch new ones when we get a live consensus to avoid the Roger bug. If we didn't do that, when Roger desuspends his laptop there would be a race between Tor fetching a new consensus, and Tor connecting to the HS which would still cause reachability issues. We also turned a rev counter check into a BUG, since we should never receive a descriptor with a strictly smaller rev counter than the one we already have, except if there is a bug or if the HSDir wants to mess with us. In any case, let's turn this into a BUG so that we can detect and debug such cases easily.
2017-08-30prop224: Purge client state on NEWNYMDavid Goulet
Closes #23355 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-24prop224: Add a client intro point state cacheDavid Goulet
This cache keeps track of the state of intro points which is needed when we have failures when using them. It is similar to the failure cache of the legacy system. At this commit, it is unused but initialized, cleanup and freed. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-24prop224: Add client-side HS descriptor cache.George Kadianakis
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-03-15Run the copyright update script.Nick Mathewson
2017-01-09Max HS descriptor size is now 50kb and also consensus param.George Kadianakis
2016-11-04prop224: Add a cache free all functionDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-04prop224: Use a const pointer for the cache lookup entryDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-04Make check-spaces happy :)George Kadianakis
Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04test: Add prop224 directory cache unit testsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04prop224: Directory cache supportDavid Goulet
This implements the proposal 224 directory descriptor cache store and lookup functionalities. Furthermore, it merges the OOM call for the HSDir cache with current protocol v2 and the new upcoming v3. Add hs_cache.{c|h} with store/lookup API. Closes #18572 Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>