| 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.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is needed now that `get_or_generate_key_and_cert()`
uses the keypair specifier when generating the subject key.
Without this the cert retrieval tests fail because
`get_or_generate_key_and_cert()` now requires the subject key specifier
to have an associated keypair specifier ("KeyCertificateSpecifier has no
keypair specifier for the subject key?").
Note that even with this patch, the `get_cert_entry()` test still fails
because of a bug in the `get_*()` family of functions. This will be
fixed in a future commit.
|
| |
|
|
|
|
| |
This will enable us to test against other keymgr APIs (e.g.
`list_matching()`), which require some extra trait impls that get
generated for free by our new `CertSpecifier` macro.
|
| | |
|
| |
|
|
|
|
|
| |
We need to be able to parse KeyPaths into KeyCertificateSpecifier,
and we can't do that if the signing key is part of the cert specifier
(because the signing key doesn't get encoded in the key path, unlike the
subject key, which does)
|
| |
|
|
| |
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.
|
| |
|
|
| |
Part of #1455
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
Part of #1455 [PATCH 2(v2)/4]
- Rework sshkeygen::ed25519_encoded to also work as replacement for
sshkeygen::exists
- Drop sshkeygen::exists
- Rename sshkeygen::{ed25519_encoded -> sshkeygen_ed25519_strings}
- Pull out sshkeygen_ed25519_strings from mod sshkeygen
- Drop mod sshkeygen
|
| |
|
|
| |
_sigh_
|
| |
|
|
|
|
|
|
|
|
| |
Part of #1455 [PATCH 2/4]
Utils include:
- mod sshkeygen
- sshkeygen::exists - check if ssh-keygen is available
- sshkeygen::ed25519_encoded - generate encoded Ed25519 keys
|
| |
|
|
|
|
|
| |
TestSpecifier::new(prefix: ...) -> new(suffix: ...)
Prefix is given by TestSpecifier::path_prefix() which returns
const TEST_SPECIFIER_PATH = "..."
|
| | |
|
| |
|
|
| |
Closes #1396
|
| |
|
|
| |
Part of #1396
|
| |
|
|
|
|
|
|
| |
This is necessary because `ParsedCert`s will not be `EncodableItem`s.
This is because we cannot (and don't want to) write certificates that
have not yet been validated to the keystore. They do need to be
retrievable from the keystore though, so we also change `ErasedKey`
to be `Box<dyn ItemType>` instead.
|
| |
|
|
| |
This is about to be used in a couple of places.
|
| | |
|
| | |
|
| |
|
|
|
| |
This function now returns a `KeystoreItemType`, enabling us to represent
certs as `EncodableItem`s.
|
| | |
|
| |
|
|
|
| |
This is part of the work needed to support storing certificates in the
keystore (they won't have a `KeyType`, but rather `CertType`).
|
| |
|
|
|
|
|
|
| |
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 moves `assert_found` out of the `keystore::arti::test` so we can
reuse it for testing other keystore implementations too.
|
| |
|
|
| |
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2393#note_3073480
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
This is used by `ArtiNativeKeystore` and the `EphemeralKeystore`.
Moving it to test_utils means `EphemeralKeystore` no longer needs to
import test helpers from the arti module.
|
| |
|
|
|
| |
Closes #1363 and addresses a handful of TODOs about `include_str!`ing
the same key multiple times from various test modules.
|
| | |
|
| |
|
|
| |
The new function checks both directions. The (misspelled) macro didn't.
|
| | |
|
| |
|