aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src/parse2/impls.rs
Commit message (Collapse)AuthorAgeFilesLines
* tor-netdoc: Un-gate parse2 and encode coreIan Jackson2026-04-231-1/+0
|
* tor-netdoc: Move raw_data_object to new container moduleIan Jackson2026-04-011-10/+0
| | | | This will allow us to use it for encoding as well as parsing.
* tor-netdoc: RSA: check exponent and min size in parse2Ian Jackson2026-01-061-1/+14
| | | | | | | | | | | | | | | According to the spec we always use this fixed exponent, and we have a minimum size of 1024. This is checked adhoc in the old parser with some slight assistance from what is now `RsaPublicParse1Helper`. It's not clear to me that checking the exponent is actually a good idea. I think checking the size is probably a bad idea, and if it is a good idea then 1024 is clearly too short. But rather than revisit these questions, let's reproduce the old behaviour in parse2. In parse2 these checks should be features of the type.
* tor-netdoc: parse2: Introduce ParseOptionsIan Jackson2025-11-181-1/+2
| | | | There are currently no options.
* tor-netcoc: Introduce NotPresent, for absent multiplicityIan Jackson2025-10-231-0/+11
| | | | | | | | | Currently this is mishandled: the current use sites (in rs/each_variety.rs) use Option<Ignored>, which would reject repeated items with that keyword, which is technically wrong. And encoing will become a problem. Vec<Ignored> would be wrong too. Instead, broaden NotPresent and give it multiplicity impls.
* tor-netdoc: Move parse2 impls on Ignored to types/misc.rsIan Jackson2025-10-231-22/+0
| | | | | | This seems to be where we're putting most of the parse2 impls on these types, now. That makes more sense as parse2 becomes more of a proper thing.
* tor-netdoc: blanket impl parse2 traits for ArcIan Jackson2025-10-211-7/+0
| | | | This replaces one ad-hoc impl and will avoid having to have any more.
* tor-netdoc: impl parse2 traits for protoversIan Jackson2025-10-151-0/+23
|
* tor-netdoc: Replace NdaSystemTimeDeprecatedSyntax with Ios8601TimeSpIan Jackson2025-10-091-4/+5
| | | | | Previously we needed this separate type because Ios8601TimeSp is FromStr which prevented a correct ItemArgumentParseable impl.
* tor-netdoc: Abolish now-obsolete field argument to from_args (fmt)Ian Jackson2025-10-091-3/+1
|
* tor-netdoc: Abolish now-obsolete field argument to from_argsIan Jackson2025-10-091-1/+0
|
* tor-netdoc: Introduce ArgumentErrorIan Jackson2025-10-091-4/+4
| | | | | This will allow us to (1) move field name handling out of the argument parser method, and also (2) add columns more easily.
* tor-netdoc: parse2: Add whole_line_len to ArgumentStreamIan Jackson2025-10-091-1/+2
|
* neteoc parse2: Provide Ignored valueIan Jackson2025-09-291-0/+22
| | | | | This will be used for some bits of netdocs where dummy values now appear.
* netdoc parse2: Fix Object handlingIan Jackson2025-09-291-0/+10
| | | | | | | | | | Use the standard multiplicity technique rather than the ad-hoc impl on Option. This allows us to support an ad-hoc parsing function for a field that's `Option`. Disentangle the `label` field attribute, which did both setting the label, and expecting a different parsing approach: replace it with `with`.
* netdoc parse2: Fix label for PublicKeyIan Jackson2025-09-291-1/+1
| | | | | This mistake escaped because this wasn't actually checked by the code, but it's going to be checked in a moment.
* tor-netdoc: Introduce parse2, new parserIan Jackson2025-08-141-0/+83
This isn't used anywhere yet. We're going to demonstrate it, and test the demo, in a moment.