| Commit message (Collapse) | Author | Age | Files | Lines | ||
|---|---|---|---|---|---|---|
| ... | ||||||
| | * | | | hsclient: Clean up some TODOs about parallelism. | Nick Mathewson | 2023-12-05 | 1 | -7/+8 | |
| | | |/ | |/| | | | | | | | | | | | | | | | | | | | * Be a little more specific about what is being parallelized. * Remove TODOs about specs, in favor of torspec#244. * Note some other issues surrounding some of the cases. (See discussions of points 3-6 at #913) | |||||
| * | | | Merge branch 'persist-macro' into 'main' | Ian Jackson | 2023-12-07 | 14 | -431/+705 | |
| |\ \ \ | |_|/ |/| | | | | | | | | | | | | | | Improve KeySpecifier, errors, IptKeySpecifier impl, etc. Closes #1116 and #1148 See merge request tpo/core/arti!1796 | |||||
| | * | | tor-hsservice: keys: Remove unused imports (and a blocking todo) | Ian Jackson | 2023-12-07 | 1 | -2/+0 | |
| | | | | ||||||
| | * | | tor-keymgr: ArtiPath[Component]: Manually reformat derive lists | Ian Jackson | 2023-12-07 | 1 | -32/+8 | |
| | | | | ||||||
| | * | | tor-keymgr: ArtiPath: impl serde | Ian Jackson | 2023-12-07 | 1 | -0/+3 | |
| | | | | ||||||
| | * | | tor-keymgr: ArtiPathComponent: Use unqualified names | Ian Jackson | 2023-12-07 | 1 | -3/+3 | |
| | | | | | | | | | | | | | This makes this like the list for ArtiPath. | |||||
| | * | | tor-keymgr: ArtiPath[Component]: Don't DerefMut | Ian Jackson | 2023-12-07 | 1 | -3/+1 | |
| | | | | | | | | | | | | | That would allow construction of invalid paths. | |||||
| | * | | tor-keymgr: ArtiPath[Component]: Add some more test aspects | Ian Jackson | 2023-12-07 | 1 | -1/+10 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test that the FromStr and TryFrom impls give the same answers as new(). These tests dodn't even compile before Properly validate in FromStr because the derive-more generated version has a wrong error type. | |||||
| | * | | tor-keymgr: ArtiPath[Component]: Properly validate in FromStr | Ian Jackson | 2023-12-07 | 1 | -2/+11 | |
| | | | | | | | | | | | | | | | | | | | | | | As pointed out in https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1796#note_2974513 derive-more just parses like the inner type, so an unvalidated String. That is wrong. | |||||
| | * | | tor-keymgr: ArtiPath[Component]: Use d-a to generate various methods | Ian Jackson | 2023-12-07 | 1 | -30/+36 | |
| | | | | | | | | | | | | | Now ArtiPath too is TryFrom<String> and AsRef<str>. | |||||
| | * | | tor-keymgr: ArtiPath: Introduce validate_str | Ian Jackson | 2023-12-07 | 1 | -3/+8 | |
| | | | | | | | | | | | | | This makes it more like ArtiPathComponent and will allow more unification | |||||
| | * | | tor-keymgr: ArtiPath tests: Add a test for a multi-component path | Ian Jackson | 2023-12-07 | 1 | -2/+6 | |
| | | | | ||||||
| | * | | tor-keymgr: ArtiPath tests: separate path from component tests | Ian Jackson | 2023-12-07 | 1 | -2/+4 | |
| | | | | | | | | | | | | | | | | | | | Rename VALID_ARTI_PATH_COMPONENTS from _PATHS. These are tested for validity as components. I want to add a test for a multi-component path, so make a place to put it. | |||||
| | * | | tor-keymgr: ArtiPath::new: Rename a confusing variable | Ian Jackson | 2023-12-07 | 1 | -2/+2 | |
| | | | | | | | | | | | | | Rebinding inner locally like this confused me. | |||||
| | * | | tor-keymgr: ArtiPathSyntaxError: impl Eq | Ian Jackson | 2023-12-07 | 1 | -1/+1 | |
| | | | | ||||||
| | * | | tor-keymgr: arti_path tests: Add two TODOs | Ian Jackson | 2023-12-07 | 1 | -0/+3 | |
| | | | | | | | | | | | | | These don't seem critical to me. | |||||
| | * | | tor-keymgr: path errors: Add some xrefs | Ian Jackson | 2023-12-07 | 2 | -1/+9 | |
| | | | | ||||||
| | * | | tor-keymgr: ArtiPathSyntaxError: rename from ArtiPathError (fmt) | Ian Jackson | 2023-12-07 | 3 | -12/+45 | |
| | | | | ||||||
| | * | | tor-keymgr: ArtiPathSyntaxError: rename from ArtiPathError | Ian Jackson | 2023-12-07 | 7 | -41/+40 | |
| | | | | | | | | | | | | | | | | The previous name was ambiguous, and confusable with KeyPathError (of which it is, basically, a variant). | |||||
| | * | | tor-keymgr: Abolish unneeded StdResult alias in arti_path | Ian Jackson | 2023-12-07 | 1 | -6/+4 | |
| | | | | ||||||
| | * | | tor-keymgr: Move ArtiPath etc. into new module (docs links) | Ian Jackson | 2023-12-07 | 1 | -2/+6 | |
| | | | | | | | | | | | | | Fix docs link breakage. | |||||
| | * | | tor-keymgr: Move ArtiPath etc. into new module | Ian Jackson | 2023-12-07 | 3 | -191/+200 | |
| | | | | | | | | | | | | | Minimal changes to still compile and pass tests. | |||||
| | * | | tor-keymgr: KeySpecifierComponent::to_component: rename from as_component | Ian Jackson | 2023-12-07 | 1 | -7/+7 | |
| | | | | | | | | | | | | | | | | | | | Normally as_... is a cheap and non-consuming (reference to reference) conversion. to_ is better here since we don't consume, but we do allocate. | |||||
| | * | | tor-hsservice: tests: IptKeySpecifier: Do round trip test | Ian Jackson | 2023-12-07 | 1 | -8/+8 | |
| | | | | ||||||
| | * | | tor-hsservice: IptKeySpecifier: impl KeySpecifier via macro | Ian Jackson | 2023-12-07 | 1 | -14/+8 | |
| | | | | ||||||
| | * | | tor-hsservice: IptKeySpecifier: make it owned | Ian Jackson | 2023-12-07 | 2 | -5/+5 | |
| | | | | | | | | | | | | | | | | The macro is going to want to be able to do a back-conversion from an ArtiPath, so there has to be an owned version. | |||||
| | * | | tor-hsservice: IptKeySpecifier: reorder fields | Ian Jackson | 2023-12-07 | 1 | -2/+2 | |
| | | | | | | | | | | | | | | | | Now they are in the order they appear in the ArtiPath, which is a bit clearer. | |||||
| | * | | tor-hsservice: IptKeyRole: impl FromStr and KeySpecifierComponent | Ian Jackson | 2023-12-07 | 1 | -1/+4 | |
| | | | | ||||||
| | * | | tor-hsservice: IptLocalId: impl KeySpecifierComponent | Ian Jackson | 2023-12-07 | 1 | -0/+3 | |
| | | | | ||||||
| | * | | tor-hsservice: IptLocalId: impl FromStr (fmt) | Ian Jackson | 2023-12-07 | 1 | -4/+2 | |
| | | | | ||||||
| | * | | tor-hsservice: IptLocalId: impl FromStr | Ian Jackson | 2023-12-07 | 2 | -27/+18 | |
| | | | | | | | | | | | | | And implement serde that way, using SerdeStringOrTransparent. | |||||
| | * | | tor-hsservice: Expose SerdeStringOrTransparent to crate | Ian Jackson | 2023-12-07 | 2 | -2/+4 | |
| | | | | | | | | | | | | | | | | And make it useable elsewhere by not expecting the particular error type. | |||||
| | * | | tor-keymgr: Make KeySpecifierComponent::as_component fallible (fmt) | Ian Jackson | 2023-12-07 | 1 | -3/+8 | |
| | | | | ||||||
| | * | | tor-keymgr: Make KeySpecifierComponent::as_component fallible | Ian Jackson | 2023-12-07 | 2 | -29/+36 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows a principled implentation via Display. The alternative would be to have runtime panics whenever someone uses KeySpecifierComponentViaDisplayFromStr but the Display impl can produce wrong syntax (that doesn't fit in an ArtiPathComponent). Bug seems like the right error since implemnting KeySpecifierComponent implies that every value is representable in an ArtiPathComponent. | |||||
| | * | | tor-keymgr: Introduce InvalidKeyPathComponentValue errors (fmt) | Ian Jackson | 2023-12-07 | 2 | -11/+9 | |
| | | | | ||||||
| | * | | tor-keymgr: Introduce InvalidKeyPathComponentValue errors | Ian Jackson | 2023-12-07 | 3 | -15/+74 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a variant in KeyPathError, which contains the actual wrong value, and the key name. But it is also a unit struct to return from the trait impl. This replaces ArtiPathError::InvalidDenotator. | |||||
| | * | | tor-hsservice: Prepare for different denotator error handling | Ian Jackson | 2023-12-07 | 1 | -5/+6 | |
| | | | | | | | | | | | | | | | | Save the ArtiPathComponent in a variable and separate out the Ok(tp) for clarity. No functional change. | |||||
| | * | | tor-keymgr: Have KeySpecifierComponent::from_component take a ref | Ian Jackson | 2023-12-07 | 2 | -7/+7 | |
| | | | | | | | | | | | | | | | | Call sites are shortly going to need the component on the error path, so this function ought probably not to consume it. | |||||
| | * | | tor-keymgr: Make two errors not be Copy | Ian Jackson | 2023-12-07 | 1 | -1/+1 | |
| | | | | | | | | | | | | | | | | | | | This is a hostage to fortune. (In a previous version of !1796 I wanted to make it untrue.) | |||||
| | * | | tor-keymgr: KeySpecifierDefault: role: allow runtime value | Ian Jackson | 2023-12-07 | 1 | -15/+72 | |
| | | | | | | | | | | | | | Make it possible for the role to be a field. | |||||
| | * | | tor-keymgr: KeySpecifierDefault: Use meta as str | Ian Jackson | 2023-12-07 | 1 | -3/+6 | |
| | | | | | | | | | | | | | This saves on some stringify! and improves error checking. | |||||
| | * | | tor-keymgr: KeySpecifierDefault: fixed_path_component feature | Ian Jackson | 2023-12-07 | 1 | -0/+29 | |
| | | | | ||||||
| | * | | tor-keymgr: KeySpecifierDefault: recast field loop | Ian Jackson | 2023-12-07 | 1 | -1/+2 | |
| | | | | | | | | | | | | | | | | We're going to do another per-field thing that doesn't want this condition. | |||||
| | * | | tor-keymgr: KeySpecifierDefault: ctor_path feature | Ian Jackson | 2023-12-07 | 1 | -8/+47 | |
| | | | | ||||||
| | * | | tor-keymgr: KeySpecifierDefault: Document attributes more formally | Ian Jackson | 2023-12-07 | 1 | -1/+20 | |
| | | | | | | | | | | | | | | | | | | | The `summary` attribute refers to a field in KeyPathInfo but this field isn't public. We can refer to builder, but there should be getters or something. | |||||
| | * | | tor-keymgr: KeySpecifierDefault: Move dead code allow | Ian Jackson | 2023-12-07 | 1 | -5/+1 | |
| | | | | ||||||
| | * | | tor-keymgr: KeyPathInfo: Provide builder() method | Ian Jackson | 2023-12-07 | 1 | -4/+11 | |
| | | | | | | | | | | | | | Otherwise the KeyPathInfo rustdocs don't have a method for making one. | |||||
| | * | | tor-keymgr: Replace assert_key_specifier_rountrip macro with function (fmt) | Ian Jackson | 2023-12-07 | 2 | -26/+8 | |
| | | | | | | | | | | | | | Formatting churn at call sites. | |||||
| | * | | tor-keymgr: Replace assert_key_specifier_rountrip macro with function | Ian Jackson | 2023-12-07 | 3 | -45/+50 | |
| | | | | | | | | | | | | | The new function checks both directions. The (misspelled) macro didn't. | |||||
| | * | | tor-keymgr: provide KeySpecifierComponentViaDisplayFromStr and use it | Ian Jackson | 2023-12-07 | 3 | -39/+24 | |
| | | | | | | | | | | | | | Now the only manual impl is TimePeriod, which is indeed special. | |||||
