summaryrefslogtreecommitdiff
path: root/crates/tor-dirclient/src/request.rs
Commit message (Collapse)AuthorAgeFilesLines
* dirclient: use correct default max_lenNick Mathewson2023-06-271-2/+2
| | | | | | Yes, it's 50 kilobytes, not 50 kibibytes. I double-checked this with the C implementation and with param-spec.txt's documentation for `HSV3MaxDescriptorSize`.
* dirclient: Correct an erroneous comment.Nick Mathewson2023-06-271-1/+2
|
* dirclient: Make maximum hsdesc length adjustable.Nick Mathewson2023-06-271-8/+12
|
* dirclient: Explain why hardcoding "3" is ok.Nick Mathewson2023-06-271-1/+7
|
* Use an Enum for the description requesttranna2023-04-101-37/+54
|
* dirclient: fix an "unused import" warning.Nick Mathewson2023-04-061-1/+1
|
* tor-dirclient: Add a comment about 50 x 1024gabi-2502023-04-031-0/+1
|
* tor-dirclient: Add test case for HsDescDownloadRequestIan Jackson2023-04-031-1/+21
| | | | | | | | I couldn't find a test vector in C Tor. This test case was generated from the code here. I'm fairly sure it's right since I managed to get my descriptor downloader to work. (That's not an MR yet, but uses this code.)
* tor-dirclient: Provide HsDescDownloadRequestIan Jackson2023-04-031-0/+43
| | | | | In my tests this seems to do the right thing, but I'm getting 404s. I'm not sure if actually this URL is wrong.
* Allow clippy::unchecked_duration_subtraction in testsNick Mathewson2023-01-271-0/+1
| | | | | This panics on error, and we're fine with a panic on misbehavior in tests.
* Complete our migration to base64ct.Nick Mathewson2023-01-201-1/+2
| | | | | | | | | This is in lieu of upgrading to the latest base64 crate, which has a different API from the old one. Since we have to migrate either way, we might as well use base64ct everywhere. I don't think that most of these cases _require_ constant-time base64, but it won't hurt.
* test lint blocks: Add many many automaticallyIan Jackson2022-12-121-0/+8
| | | | | This is precisely the result of running the rune in maint/adhoc-add-lint-blocks.
* cfg compilation: Add two allowsIan Jackson2022-11-181-0/+1
|
* tor-dirclient: Provide RoutersOwnDescRequestIan Jackson2022-10-251-0/+29
| | | | This will be used for bridges' descriptors.
* dirclient: Generalize MdSha256Empty to EmptyRequest.Nick Mathewson2022-07-071-2/+5
| | | | | (It makes sense to use this for things that are not in fact lists of SHA256 digests of Microdescriptors.)
* dirclient: Fix comments re conssensus request without authoritiesIan Jackson2022-06-101-5/+3
|
* dirclient: Replace four very similar "ids in request"Ian Jackson2022-06-091-28/+44
| | | | | | | | | | In reviewing !553 I noticed that the empty digest list error had to be handled in two places. I filed #492 about the duplication. In fact it turns out to have been quadruplication. The new code also avoids cloning the underlying objects, instead sorting a Vec of references.
* dirclient: Test consensus request based on empty ConsensusRequestIan Jackson2022-06-091-0/+8
| | | | | | I'm not sure this is right. But providing a test case for it before my next change ensures that my refactoring doesn't change the behaviour.
* tor-dirclient: Require that self.digests is nonemptyNeel Chauhan2022-05-301-2/+6
|
* dirclient: add the ability to reject circuits that are too skewed.Nick Mathewson2022-05-111-1/+65
| | | | This will help implement #466.
* Remove allow(clippy::disallowed_methods) lint.Nick Mathewson2022-03-301-1/+0
|
* Merge branch 'no-system-time' into 'main'eta2022-03-301-0/+1
|\ | | | | | | | | | | | | Don't use SystemTime::now() Closes #306 See merge request tpo/core/arti!365
| * use wallclock where possible in teststrinity-1686a2022-02-261-0/+1
| |
* | dirclient: Collect and expose peer information from errors.Nick Mathewson2022-03-211-1/+2
| | | | | | | | | | | | | | | | | | | | This commit refactors the dirclient error type into two cases: errors when constructing a circuit, and errors that occur once we already have a one-hop circuit. The latter can usually be attributed to the specific cache we're talking to. This commit also adds a function to expose the information about which directory gave us the info.
* | Replace manual Default and new with std derive in tor-dirclientIan Jackson2022-03-021-30/+6
|/
* add semicolons if nothing returnedDaniel Eades2021-11-251-2/+2
|
* tor-dirclient: Put routerdesc download behind a feature.Nick Mathewson2021-11-121-0/+8
| | | | Part of #125
* fix/silence clippy lints in test modulesDaniel Eades2021-09-081-1/+1
|
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-271-0/+555
This will cause some pain for now, but now is really the best time to do this kind of thing.