| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Over the years we've found that most callers who want a netdir want
what C Tor calls a "reasonably live" network directory: One that is
not expired by too much, or too far in the future. But a few want a
_strictly_ live directory: one that says it is valid now, with no
tolerances. And a few want _any_ directory, no matter how expired
it is.
This commit adds net methods to NetDirProvider to provide these
directories. I think that most use cases will want to explicitly
think about what kind of directory they want, so I've made `netdir`
the simplest method. I might remove `timely_netdir` by the end of
this branch; see TODO comments.
Part of #518.
|
| |
|
|
|
| |
There's no reason to have the test-network-construction code share an
error enum with the main netdir code.
|
| |
|
|
|
| |
This turns out to have been most of them, which
simplifies matters a lot.
|
| |
|
|
|
| |
Every other case of tor_netdoc::Error means a parse failure. This one,
though, means a failure to construct a document.
|
|
|
This will cause some pain for now, but now is really the best time
to do this kind of thing.
|