| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This commit executes maint/add_warning with the just added change to
deny string slices except in tests.
I recommend auditing this by checking out the previous commit followed
by running the script yourself and then verifying that the diff is
identical to this commit.
This commit makes cargo clippy fail. We will add exceptions in the next
commit.
|
| |
|
|
| |
Addresses https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3754#note_3361904
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This commit is intentionally misindented to make reviewing the diff a
bit easier.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In a certificate's `ArtiPath`, the `ArtiPath` of the subject key is now
separated from the certificate denotators by `@`. This will enable us to
derive the subject key `ArtiPath` from the `ArtiPath` of its
certificate.
In practice, this change is a no-op for the relay implementation,
because none of our certificates have certificate denotators. For
instance, the `ArtiPath` of the for the `KP_relaysign_ed` certificate
(`KP_relaysign_ed` signed with `KS_relayid_ed`) is of the form
`relay/relaysign_ed+<valid_until>` (the only denotators here are the
denotators of the subject key).
It's important to note that the certifying key is not encoded in the
`ArtiPath` of the certificate. The implication is that if we'll ever
need to have multiple certs for the same subject key, signed with
different with different certifying keys, those certificates will be
distinguished by their certificate denotator group. So if we ever need a
second certificate for `KP_relaysign_ed`, certified with something other
than `KP_relaysign_ed`, it will need to be of the form
`relay/relaysign_ed+<valid_until>@<CERT_DENOS>`, where `<CERT_DENOS>`
is a list of `+`-separated certificate denotators.
Closes #2377
|
| |
|
|
|
|
| |
This will enable us to parse certificate paths that consist of the
`ArtiPath` of the subject key, followed by the denotator group of the
certificate.
|
| | |
|
| |
|
|
|
|
|
| |
This introduces the concept of a "denotator group", and new syntax for
separating denotator groups within an ArtiPath.
The implementation will follow in a separate commit.
|
| |
|
|
| |
Run maint/add_warning
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
First, run
```
git grep -l "^edition =" |
xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;'
```
Second, manually verify that all Cargo.toml files have changed,
and nothing else has changed.
Third, run cargo fmt again.
|
| | |
|
| |
|
|
|
| |
These aren't needed anymore now that `KeySpecifierComponent` is in
scope.
|
| |
|
|
| |
This will be used for looking up certificates in the keystore.
|
| | |
|
| |
|
|
|
| |
This is only used for representing portions of `ArtiPath`s, so let's
rename it accordingly.
|
| |
|
|
|
|
|
|
|
|
|
| |
* Change `pub` to `export`
* Change the `=` in define to `:`
* Change `pub_template_semver_check` to `template_export_semver_check`
Right now, 0.12.1 supports both syntaxes. I have verified this branch
also compiles with
https://gitlab.torproject.org/Diziet/rust-derive-deftly/-/merge_requests/402
ee171ffaf56d7dcb7d75584054921153fe19b222
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the combination of a number of separate commits, many of which
were generated by seddery, and then rebased and squashed.
Cargo.toml
perl -i~ -pe 's{^derive-adhoc}{derive-deftly = "0.10"}' crates/*/Cargo.toml
(not regenerated during rebase)
update Cargo.lock
`cargo fetch` without --locked
(regenerated during rebase)
seddery
git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{^use derive_adhoc}{use derive_deftly}'
git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bdefine_derive_adhoc\b}{define_derive_deftly}g'
git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bAdhoc\b}{Deftly}g if m{derive}'
git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\#\[derive_adhoc\b}{#[derive_deftly}g'
git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{use derive_adhoc}{use derive_deftly}'
git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bderive_adhoc\b}{derive_deftly_adhoc} if m{use.*deftly}'
git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bderive_adhoc!}{derive_deftly_adhoc!}'
(not regenerated during rebase)
Manually add `#[derive_deftly_adhoc]` where needed.
seddery
git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\#\[adhoc\b}{#[deftly}g'
git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bderive_adhoc_template}{derive_deftly_template}'
(not regenerated during rebase)
Manually fix up an import
Manually update some builder attrs
Manually fix up tor_rtmock::time_core
This was missed in my seddery, due to me rebasing the branch and not
redoing the seddery.
|
| |
|
|
| |
This removes a remnant of a now-gone TODO.
|
| |
|
|
|
|
|
|
|
| |
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 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
|
| | |
|
| | |
|
| |
|
|
|
|
| |
`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
|
| | |
|
| | |
|
| |
|
|
| |
This makes this like the list for ArtiPath.
|
| |
|
|
| |
That would allow construction of invalid paths.
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
| |
Now ArtiPath too is TryFrom<String> and AsRef<str>.
|
| |
|
|
| |
This makes it more like ArtiPathComponent and will allow more unification
|
| |
|
|
| |
Rebinding inner locally like this confused me.
|
| |
|
|
|
| |
The previous name was ambiguous, and confusable with KeyPathError
(of which it is, basically, a variant).
|
| | |
|
| |
|
|
| |
Fix docs link breakage.
|
|
|
Minimal changes to still compile and pass tests.
|