summaryrefslogtreecommitdiff
path: root/tor-netdoc/src/err.rs
Commit message (Collapse)AuthorAgeFilesLines
* Add a microdesc builder, for testing.Nick Mathewson2021-05-051-0/+5
|
* Enforce (and obey) clippy lints about exhaustive enums, structs.Nick Mathewson2021-04-271-0/+1
| | | | | | | | These lints force us to declare our exported enums and exhaustive-looking structs as non-exhaustive (so that we can add to them in the future without breaking our API) or to explicitly disable the warning for a given enum/struct (to say that we _intend_ for additions to be a breaking change).
* Enforce that the periods in a consensus lifetime are nonempty.Nick Mathewson2020-12-041-0/+5
| | | | | To be valid, a lifetime must have valid_after < fresh_until < valid_until.
* Mark tor_netdoc::err::Pos as Send and SyncNick Mathewson2020-11-111-0/+9
| | | | | | I am about 99% sure this is safe: the pointer that this type contains is never dereferenced, and is only compared to the bounds of a string later on.
* Calculate digest correctly when microdesc ends with base64 object.Nick Mathewson2020-10-191-11/+29
|
* tests for some failing cases in mdconsensusNick Mathewson2020-10-061-0/+5
|
* Netdoc: use a more bulletproof pattern to prevent infinite loopsNick Mathewson2020-10-021-0/+39
| | | | | | | | | | | | | | | | Previously our "read a bunch of this kind of document" functions had a common problem, where they could get into an infinite loop if the underlying "read this kind of document" function failed without consuming any tokens. I _think_ that this error case was unreachable (or else fuzzing would have found it, right?), but proving that it was unreachable was a bit fiddly, and I couldn't follow my own arguments about it. Instead, we just store the position of the reader before we start reading, and make sure that it has consumed at least some data. If it hasn't, then we consume and drop a token before advancing to the next document.
* netdoc: rename BadVersion to BadTorVersion for clarityNick Mathewson2020-10-011-2/+2
|
* improve errors in authcert.rsNick Mathewson2020-10-011-0/+8
|
* More tests for tokenize.rs, with some bugfixesNick Mathewson2020-09-301-1/+8
|
* Start on some tests for parse::tokenize.rsNick Mathewson2020-09-291-1/+1
|
* Move around the modules inside tor-netdoc.Nick Mathewson2020-09-291-3/+3
| | | | | This change just gives them a more logical breakdown into parsing, documents, and misc other types.
* Port authcert to use tor_checkable.Nick Mathewson2020-09-031-0/+6
|
* Migrate certificate and routerdesc checking to tor-checkableNick Mathewson2020-09-031-0/+20
| | | | | Now these types are parsed and returned wrapped inside a checkable object.
* netdoc: Parser for microdesc consensus documentsNick Mathewson2020-08-271-0/+8
| | | | | There's more to do here, and things to refactor, but this ought to be enough to get a rudimentary client working.
* Implement microdescriptor parsing.Nick Mathewson2020-05-151-1/+6
| | | | | Additionally, move and refactor related types to reduce friction for microdescriptor parsing implementation.
* netdoc: Relax error types that can be used when parsing.Nick Mathewson2020-05-151-0/+24
|
* Remove 'idx' field from BadArgument.Nick Mathewson2020-05-151-3/+3
| | | | | Having byte-level positions means we don't need to complain about particular arguments.
* Improve reported positions of parsing errors.Nick Mathewson2020-05-131-0/+5
|
* netdoc: rename Position to Pos.Nick Mathewson2020-05-131-41/+41
| | | | We use this type a lot, so let's give it a short name.
* netdoc: use a more flexible error-position type based on raw pointersNick Mathewson2020-05-131-1/+32
| | | | | Astonishingly, this is safe, though I wish that it were impossible to use mismatched strings.
* netdoc: Add an "at()" method to replace an error's location.Nick Mathewson2020-05-131-0/+9
|
* routerdesc: enforce position of identity-ed25519.Nick Mathewson2020-05-121-2/+7
|
* tor-netdoc: require documentation, and fill in final missing docsNick Mathewson2020-05-091-2/+10
|
* Document more of 'netdoc', including errors.Nick Mathewson2020-05-091-28/+95
|
* Fresh git repository for work on "arti"Nick Mathewson2020-05-071-0/+138
Arti is a rust tor implementation. It's project I've been working on for a few months now, in weekends and in spare time. It doesn't speak the tor protocol yet, and it doesn't connect to the network at all. It needs much more documentation and testing, but I'm just about ready to show it to others. See the README.md for a description of what is there and what isn't.