| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
|
| |
Previously, `InvalidKeyPathComponentValue` was a single error type, with
the error message hard-coded to "invalid key denotator". This was wrong,
because this error is used for other types of invalid components too
(not just for invalid denotators).
Part of #1115
|
| | |
|
| |
|
|
|
|
|
| |
All `KeyPathError` variants now include the `ArtiPath` that caused the
error.
Part of #1115
|
| |
|
|
| |
Part of #1115
|
| |
|
|
|
|
| |
The offending `ArtiPath` should be included in the error.
Part of #1115
|
| |
|
|
|
|
|
|
|
| |
Originally, these functions converted to and from `ArtiPathComponent`.
In !1931, we replaced `ArtiPathComponent` with `Slug` without renaming
the conversion functions. Since we're converting to and from `Slug` now,
I think it makes sense to rename them too.
Part of #1115
|
| | |
|
| |
|
|
|
|
| |
This trait extracts a `KeyPathInfo`, not a `KeyInfo`.
Part of #1115
|
| |
|
|
| |
Part of #1115
|
| |
|
|
|
|
|
|
| |
This also removes a TODO regarding adding a `Nickname` type for
representing `HsClientSpecifier` and `HsNickname` (we don't need it if
`Slug`s are non-empty).
Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1931#note_2990227
|
| |
|
|
| |
This also fixes a bug in `HsId::from_component`.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
These tests belong in tor_persist now.
|
| |
|
|
|
|
| |
`ArtiPathComponent`s are really just `Slugs`.
Part of #1193, #1092
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This will make it easier to replace `ArtiPathComponent` with `Slug`
later down the line.
Note this changes the syntax rules of `ArtiPathComponent`:
* previously `ArtiPathComponent`s could be unicode strings,
(now they are lowercase ASCII alphanumerics, plus `-`, `_`)
* previously `ArtiPathComponent`s couldn't start with `-` or `_`,
but now they can
Part of #1193, #1092
|
| |
|
|
|
|
| |
We are about to replace `ArtiPathComponent` with `Slug`, but `Slug`s
don't support `.`, so let's strip the `.onion` suffix before encoding it
in the `ArtiPath`.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
We are about to need this implementation.
|
| |\
| |
| |
| |
| |
| |
| | |
KeySpecifier improvements
Closes #1126, #1147, and #1151
See merge request tpo/core/arti!1851
|
| | |
| |
| |
| |
| | |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1851#note_2981473
|
| | |
| |
| |
| |
| |
| |
| | |
Swap the docs for new_any and arti_pattern to the right methods!
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1851#note_2981475
|
| | | |
|
| | |
| |
| |
| | |
This *is* the spec name.
|
| | |
| |
| |
| | |
Finishes arti#1151 item 10.
|
| | |
| |
| |
| | |
This also passes the information we'll need to populate extra_info.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
This can only happen if we tried to parse an ArtiPath as the wrong
kind of KeySpecifier, which shouldn't happen very often.
If it does, the pattern isn't that interesting. Which is just as
well, since we're about to make it a bit harder to obtain it in the
place where this error is going to be constructed.
|
| | |
| |
| |
| |
| |
| | |
So now .arti_pattern() is a trait method.
arti#1151 item 3.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
arti_prefix is no longer used. Abolish prefix too.
arti#1151 item 7.
Closes #1147.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This is a better API. The implementation has less monomorphisation.
arti#1151 item 2 and the patterns part of 4.
Closes #1126.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
Part of arti#1151 item 10.
Discussion in
https://gitlab.torproject.org/tpo/core/arti/-/issues/1151#note_2977278
|
| | |
| |
| |
| | |
This is going to expand and gain private helper methods.
|
| | |
| |
| |
| |
| | |
We don't handle enums and we don't want to try.
Put this here as documentation of this intent.
|
| | |
| |
| |
| | |
arti#1151 item 1.
|
| |/
|
|
| |
Now d-a #27 is fixed, we don't need this.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
| |
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.
|
| |
|
|
| |
These don't seem critical to me.
|
| | |
|
| | |
|
| |
|
|
|
| |
The previous name was ambiguous, and confusable with KeyPathError
(of which it is, basically, a variant).
|
| |
|
|
| |
Minimal changes to still compile and pass tests.
|