| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
| |
Removed unnecessary lint
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
I think this adds unnecessary indirection, and it's a bit confusing to
have two separate keystore entry types (we have `KeystoreEntry` too).
This type exists just to server as a wrapper over the `RawEntryId` of an
unrecognized keystore entry, and the `KeystoreId` of the keystore it was
found in.
This commit folds `RawKeystoreEntry` into `UnrecognizedEntry`, which was
previously a thin wrapper over `RawKeystoreEntry`.
|
| |
|
|
|
| |
These are significantly different from `KeySpecifierPattern`s, so it's
best to have a separate trait.
|
| | |
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
`clippy::collapsible_if` started triggering after bumping the MSRV to
1.88.
Since this triggers from a lot of places, and since there even are a
couple of instances where we explicitly allow `clippy::collapsible_ifs`,
I've opened #2342 for deciding what to do about it.
|
| |
|
|
| |
This adds the lint to all our crates.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This will make it easier to see the correspondence between CTorPaths
and the HS client/service key specifiers.
Initially, I was hoping this would make it easier to write a d-d macro
that automatically derives a `CTorPath` variant (e.g.
`HsClientDescEncKeypair`) from the KeySpecifier type name
(`HsClientDescEncKeypairSpecifier`), but alas, I don't think d-d can
"chop off" name suffixes ("Specifier", in this case).
`from_ctor_path()`/`ctor_path()` implementations for converting
`CTorPath`s to and from key specifiers.
|
| | |
|
| | |
|
| |
|
|
|
| |
This makes the error handling around `KeyPath`s a bit more sensible,
IMO, and it will make it easier to extend it for `CTorPath` errors.
|
| |
|
|
|
|
|
|
|
| |
Fixes part of #2193.
(Edits from nickm: I selected the cases here that I could verify
were correct from immediate context.)
Edited-by: Nick Mathewson <[email protected]>
|
| |
|
|
| |
Run maint/add_warning
|
| |
|
|
| |
This feature has been removed from nightly, in favor of doc_cfg.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* CLI: Add `keys-raw` and subcommand `remove-by-path`
* arti: Add `arti::subcommand::raw` for the CLI `keys-raw`
* tor-keymgr: Add `ArtiNativeKeystoreError::UnexpectedRawEntry`,
`ArtiEphemeralKeystoreError::NotSupported`
* tor-keymgr: Add `tor-keymgr::raw` module
* tor-keymgr: Add `Keystore::remove_unchecked`
* tor-keymgr: Change `Keystore::list` to return `KeystoreEntry`
* tor-keymgr: Add field `KeystoreEntry::raw_id`
* doc: Update keys.md
* doc: Add raw.md
* tor-keymgr: BREAKING: `UnrecognizedEntryError::new` associated
function is now only accessible within the crate `tor-keymgr`
* tor-keymgr: BREAKING: `UnrecognizedEntryId` is renamed to
`UnrecognizedEntry`
* tor-keymgr: BREAKING: `KeyMgr::list()` and `Keystore::list()`
now return `Result<Vec<KeystoreEntryResult<KeystoreEntry>>>`
|
| |
|
|
| |
See #2060.
|
| |
|
|
|
| |
* Change return type `Result<Vec<(KeyPath, KeystoreItemType)>>` if favor
of `Result<Vec<StdResult<(KeyPath, KeystoreItemType), UnrecognizedEntryError>>>`
|
| |
|
|
|
| |
Fixes several warnings from
cargo check --workspace --no-default-features
|
| |
|
|
|
|
| |
Denies 'mod.rs' files for consistency.
https://rust-lang.github.io/rust-clippy/master/index.html#mod_module_files
|
| |
|
|
|
|
|
|
| |
This is the first step in replacing `EncodableKey` with the new
`EncodableItem` trait (see doc/dev/keymgr-certificates.md).
(this refactoring is split over multiple commits to make reviewing
easier)
|
| | |
|
| |
|
|
| |
This will be used for defining key certificate specifiers.
|
| |
|
|
|
|
|
|
| |
In 1.83, this warning triggers on many of our crates.
We're thinking of fixing them all, but for now,
we're going to disable the warning.
This is part of #1765.
|
| |
|
|
| |
This doesn't seem to be needed anymore.
|
| | |
|
| |
|
|
|
|
|
| |
Now
cargo check --workspace --no-default-features --all-targets
cargo build -p arti --no-default-features --features=memquota,tokio,native-tls
are both clean.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This is only used for representing portions of `ArtiPath`s, so let's
rename it accordingly.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
C Tor's client restricted discovery keys don't have the service hsid
encoded in the filename (the hsid of the service each key is associated
with is encoded in contents of the key file). This means that given a
key specifier like `HsClientDescEncKeypairSpecifier` (which is a wrapper
over an HsId), we can't actually compute the relative path of the key in
its `KeySpecifier::ctor_path()` implementation. To do so we would need
to access the keystore to figure out which path contains the requested
HsId, which we can't (and shouldn't!) do from within the `KeySpecifier`
impl.
This suggests the String newtype (representing a relative path) we
previously had is not a good abstraction for `CTorPath`s. Moreover,
`CTorPath` are static (they don't have dynamic components like
`ArtiPath`), so it makes more sense to model `CTorPath` as an enum.
The new `CTorPath::ClientHsDescEncKey(HsId)` variant will be used to
instruct the C Tor client keystore to find the file that contains the
specified `HsId`, while the `Service` variant will be used for hidden
service keys.
|
| |
|
|
|
|
|
|
|
|
| |
Previously, arti's primary keystore was referred to as its "default"
keystore. However, "default" is inaccurate here: there is no way to
meaningfully override this "default" (the "default" store acts as the
main keystore). Throughout the codebase, we query all keystores for keys
(including the secondary ones), but only ever write to the
default/primary keystore. This is OK for now, because it enables us to
have one mutable keystore, and multiple secondary, read-only stores.
|
| |
|
|
| |
Feature is named "ephemeral-keystore".
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
Everything copied in the previous commits to tor-keys is now removed and
tor-keys crate is used accross the code.
Minor changes to tor-keys to accomodate this change.
Part of #1137
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
| |
* Bump in Cargo.toml
* Deal with `${Xmeta as ...}` incompatible change, by
always specifying an `as`, and changing `as tokens`.
|
| |\
| |
| |
| |
| |
| |
| | |
tor-keymgr: Refactor code shared between ArtiNativeKeystore and ArtiEphemeralKeystore
Closes #1362 and #1367
See merge request tpo/core/arti!2131
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Some of the types and impls from `key_type/ssh.rs` (such as
`UnparsedOpenSshKey`) have nothing to do with `KeyType`, and are only
used by the `ArtiNativeKeystore`, so I'm moving them to the `arti`
keystore module.
The shared ssh-related stuff now lives in the top-level `ssh.rs`.
|
| |/
|
|
| |
This commit is automatically generated.
|
| | |
|
| |
|
|
|
|
| |
`KeyMgrBuilderError` is used in `KeyMgrBuilder`'s public API.
See https://gitlab.torproject.org/tpo/core/arti/-/issues/1358#note_3016025
|
| |
|
|
|
|
|
| |
This is a new feature in d-d 0.10.0.
Our currrent semver policy doesn't care about this, but let's not
encode that property in the tree and leave ourselves a booby-trap.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|