| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
|
| |
This commit adds a new method `get_keypair_specifier()` to `KeySpecifier`.
This method is used to indicate when one KeySpecifier (e.g. `KP_hs_id`) is the
public part of another keypair (e.g. `KS_hs_id`). It will return the
containing keypair in this case, and `None` otherwise.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
FooKeypairSpecifier` instances
This adds the following trivial `From` instances:
- tor_hsservice: impl From<&HsIdPublicKeySpecifier> for HsIdKeypairSpecifier
- tor_hsservice: impl From<&BlindIdPublicKeySpecifier> for BlindIdKeypairSpecifier
- tor_hscrypto::pk: impl From<HsBlindIdKeypair> for HsBlindIdKey
- tor_llcrypto::pk::ed25519: impl From<ExpandedKeypair> for PublicKey
- tor_keymgr::mgr: impl From<TestKey> for TestPublicKey
- tor::hscrypto::pk: impl From<HsIdKeypair> for HsIdKey
|
| |
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
| |
Found by "git grep adhoc" and manual inspection.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
| |
These are mostly about explicitly linking to things that were
already in scope.
|
| | |
|
| |
|
|
| |
Part of #1271
|
| |
|
|
|
|
|
| |
NB: `KeyMgr::remove_with_type` will need to be renamed to
`KeyMgr::remove_entry`.
Part of #1271
|
| |
|
|
| |
Part of #1271
|
| |
|
|
|
|
|
|
|
|
|
| |
The onion service keys now live in the `hss/<nickname>` subdirectory
within the keystore.
This layout change is **not** backwards-compatible, so if you want to
use your existing hidden service keys, you will need to manually move
them to `<keystore_root>/hss`.
Closes #1260
|
| |
|
|
|
|
|
| |
The role is a slug, and slugs are not allowed to contain uppercase
characters.
Closes #1195
|
| | |
|
| |
|
|
|
| |
Now the remove_if_expire closure, which does the actual work, is
lexically outside the macro, and the macro is trivial.
|
| |
|
|
|
|
| |
This allows us to have a closure containing runtime-polymorphic code,
reducing monomorphisation and moving code out of a macro into a
closure.
|
| |
|
|
|
|
|
|
| |
Our pattern is now supposed to ensure that we don't see any irrelevant
keys. So if we do, that's a bug.
(The code layout is getting increasingly odd. We'll sort that out
along with some code motion later.)
|
| |
|
|
|
|
|
| |
Only examine keys for this HS.
This avoids thinking about every key for every HS for every netdir
change. That's quadratic in the number of HS's.
|
| |
|
|
| |
We're going to change where this is called.
|
| |
|
|
|
|
| |
If you derive `KeySpecifier` and forget to import `KeySpecifierPattern`
you get a confusing error. It's better to let the macro import (or fully
qualify) the necessary types from tor-keymgr.
|
| | |
|
| |
|
|
|
|
| |
Where we wanted this, use derive_more::Constructor isntead.
arti#1151 item 6.
|
| |
|
|
|
|
| |
So now .arti_pattern() is a trait method.
arti#1151 item 3.
|
| |
|
|
|
|
|
|
| |
This is a better API. The implementation has less monomorphisation.
arti#1151 item 2 and the patterns part of 4.
Closes #1126.
|
| |
|
|
|
| |
I'm not sure why the compiler doesn't complain about this already, but
it becomes "more" unused later.
|
| |
|
|
| |
arti#1151 item 1.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
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.
|
| |
|
|
|
| |
Now they are in the order they appear in the ArtiPath, which is a bit
clearer.
|
| | |
|
| |
|
|
| |
Formatting churn at call sites.
|
| |
|
|
| |
The new function checks both directions. The (misspelled) macro didn't.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
We're about to use them.
|
| |
|
|
|
|
| |
We need this because the key specifier types will soon be owned types
too (they will soon grow a From<&KeyPath> impl). We _could_ make them
store `Cow`s instead, but I think that's a premature optimization.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
We don't need this macro now that we adhoc-derive the implementation.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
Underscores are used within `ArtiPath`s as visual separators. To reduce
ambiguity, we now use a different character for separating the
key denotators (e.g. time periods) from the rest of the `ArtiPath`.
Closes #1063
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Fixes:
cargo doc --workspace $f --document-private-items
1 | //! [`KeySpecifier`] implementations for hidden service keys.
| ^^^^^^^^^^^^ no item named `KeySpecifier` in scope
8 | /// A helper for defining service [`KeySpecifier`]s.
| ^^^^^^^^^^^^ no item named `KeySpecifier` in scope
|