aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-keymgr/src/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* tor-keymgr: Downgrade a documentation TODO.Gabriela Moldovan2024-02-191-1/+1
| | | | | The tor-keymgr crate *is* documented, but could use a better README and some examples and/or usage guides.
* tor-keymgr: Make InvalidKeyPathComponentValue public.Gabriela Moldovan2024-02-191-3/+4
| | | | | It appears within the public API (it is the error type returned from `KeySpecifierComponent`), so let's make it public.
* tor-keymgr: Derive From for KeystoreSelector.Gabriela Moldovan2024-02-191-2/+2
| | | | We will soon use this in `KeyMgr`.
* tor-keymgr: Add KeystoreEntry.Gabriela Moldovan2024-02-191-1/+1
| | | | | | | | | | This type will soon replace `(KeyPath, KeyType)` in `KeyMgr::list_matching`. The KeystoreEntry documentation mentions a couple of functions that don't exist right now (they will be added in a subsequent commit). Part of #1271
* tor-keymgr: Rename KeyInfoExtractor to KeyPathInfoExtractor (fmt).Gabriela Moldovan2024-02-051-2/+2
|
* tor-keymgr: Rename KeyInfoExtractor to KeyPathInfoExtractor.Gabriela Moldovan2024-02-051-1/+1
| | | | | | This trait extracts a `KeyPathInfo`, not a `KeyInfo`. Part of #1115
* tor-keymgr: Abolish ArtiPathComponent.Gabriela Moldovan2024-01-311-1/+1
| | | | | | `ArtiPathComponent`s are really just `Slugs`. Part of #1193, #1092
* tor-keymgr: Turn some TODOs into #1115.Gabriela Moldovan2024-01-101-1/+1
|
* tor-keymgr: Turn a TODO HSS into #1193.Gabriela Moldovan2024-01-101-1/+1
|
* KeySpecifier d-a macro: Use doc-hidden re-exportsIan Jackson2024-01-041-1/+1
|
* KeySpecifier: Make KeySpecifierPattern a traitIan Jackson2024-01-041-1/+1
| | | | | | So now .arti_pattern() is a trait method. arti#1151 item 3.
* KeySpecifier d-a macro: Move to its own moduleIan Jackson2024-01-041-0/+3
| | | | This is going to expand and gain private helper methods.
* tor-keymgr: ArtiPathSyntaxError: rename from ArtiPathError (fmt)Ian Jackson2023-12-071-3/+3
|
* tor-keymgr: ArtiPathSyntaxError: rename from ArtiPathErrorIan Jackson2023-12-071-1/+1
| | | | | The previous name was ambiguous, and confusable with KeyPathError (of which it is, basically, a variant).
* tor-keymgr: Move ArtiPath etc. into new moduleIan Jackson2023-12-071-2/+4
| | | | Minimal changes to still compile and pass tests.
* tor-keymgr: provide KeySpecifierComponentViaDisplayFromStr and use itIan Jackson2023-12-071-1/+1
| | | | Now the only manual impl is TimePeriod, which is indeed special.
* tor-keymgr: Abolish the KeyDenotator trait in favour of KeyPathComponent (fmt).Gabriela Moldovan2023-12-051-3/+3
|
* tor-keymgr: Abolish the KeyDenotator trait in favour of KeyPathComponent.Gabriela Moldovan2023-12-051-1/+1
|
* tor-hsservice: Test the TryFrom<&KeyPath> KeySpecifier impl.Gabriela Moldovan2023-12-051-2/+2
|
* tor-keymgr: Add a module for test utilities.Gabriela Moldovan2023-12-051-0/+2
|
* tor-keymgr: Make DefaultKeySpecifier generate a key info extractor as well.Gabriela Moldovan2023-12-051-1/+1
|
* tor-keymgr: Introduce a KeySpecifierComponent trait.Gabriela Moldovan2023-12-051-1/+1
| | | | | | | | | Now the fields of a `DefaultKeySpecifier` no longer have to implement `Display` (they need to implement `KeySpecifierComponent`). See https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1733#note_2966400 Closes #1127
* tor-keymgr: Add a way of registering key info extractors using inventory.Gabriela Moldovan2023-12-051-1/+1
|
* tor-keymgr: Add types for extracting info out of a KeyPath.Gabriela Moldovan2023-12-051-2/+3
|
* tor-keymgr: Change KeyDenotator error type to KeyPathError.Gabriela Moldovan2023-12-051-1/+1
| | | | | This is a separate class of errors that deserves its own error type. We will soon use `KeyPathError` in other contexts as well.
* Merge branch 'keymgr-derive-builder' into 'main'gabi-2502023-11-281-1/+4
|\ | | | | | | | | | | | | tor-keymgr: Derive Builder for KeyMgr. Closes #1114 See merge request tpo/core/arti!1760
| * tor-keymgr: Derive Builder for KeyMgr.Gabriela Moldovan2023-11-271-1/+4
| | | | | | | | | | | | | | `KeyMgr` is soon going to have more fields, so now is a good time to derive `Builder` for it. Closes #1114
* | tor-keymgr: Move ArtiPathError, KeystoreCorruptionError to err.rs.Gabriela Moldovan2023-11-211-3/+3
|/ | | | | | KeystoreCorruptionError is about to become a variant of the top-level keymgr Error enum (which doesn't exist yet but will be introduced in a future commit).
* tor-keymgr: Rewrite define_key_specifier using derive-adhoc.Gabriela Moldovan2023-11-201-0/+3
| | | | | | | | For the most part, this is just code movement. The implementation was copied over to `define_derive_adhoc` from `define_key_specifier`, with some minor adjustments that were needed to make it compile. Closes #1093
* tor-keymgr: Add missing backticks (fmt).Gabriela Moldovan2023-11-131-2/+1
|
* tor-keymgr: Abolish KeyPathPatternSet.Gabriela Moldovan2023-11-131-1/+1
| | | | | | We don't really need it. Closes #1066
* tor-keymgr: Add an error type for keystore corruption (fmt).Gabriela Moldovan2023-11-021-2/+2
|
* tor-keymgr: Add an error type for keystore corruption.Gabriela Moldovan2023-11-021-0/+1
|
* tor-keymgr: Add a constant for the denotator separator.Gabriela Moldovan2023-11-021-1/+1
|
* tor-keymgr: Move the KeyDenotator trait to tor-keymgr.Gabriela Moldovan2023-10-301-2/+2
| | | | | The trait is no longer sealed because users should be allowed to define their own key denotators.
* tor-keymgr: Rename KeyPathError to ArtiPathUnavailableError (fmt).Gabriela Moldovan2023-10-191-2/+2
|
* tor-keymgr: Rename KeyPathError to ArtiPathUnavailableError.Gabriela Moldovan2023-10-191-1/+1
|
* tor-keymgr: Add KeyMgr::list_matching for retrieving keys that match a given ↵Gabriela Moldovan2023-10-191-1/+1
| | | | pattern.
* tor-keymgr: Give KeyType an Unknown variant.Gabriela Moldovan2023-10-191-3/+3
|
* tor-keymgr: Add matching functionality and types for representing patterns.Gabriela Moldovan2023-10-191-1/+2
|
* tor-keymgr: Add ArtiPathError, KeyPathError (fmt).Gabriela Moldovan2023-10-191-1/+3
|
* tor-keymgr: Add ArtiPathError, KeyPathError.Gabriela Moldovan2023-10-191-1/+1
|
* tor-keymgr: Add an enum for representing an ArtiPath or a CTorPath.Gabriela Moldovan2023-10-191-1/+1
| | | | | | This will enable the future `KeyMgr::list_matching()` API to return a list that contains results from (potentially) multiple different keystore backends.
* tor-keymgr: Factor the generate() function into a separate trait.Gabriela Moldovan2023-10-091-1/+1
| | | | | | `EncodableKey` is a trait for encoding keypairs and public keys. Keygen only makes sense for key_pairs_ (it doesn't make sense for public keys), so it makes sense to move `generate()` out of `EncodableKey`,
* tor-keymgr: Make EncodableKey support public keys too.Gabriela Moldovan2023-09-251-1/+1
| | | | | | | | | Previously, `EncodableKey::to_keypair_data` could only be used for encoding private keys (its return type was `KeypairData`). Now `EncodableKey::to_keypair_data` can return public key data (`KeyData`) too. Note: `to_keypair_data()` will be renamed in a future commit.
* tor-keymgr: Re-export ssh-key.Gabriela Moldovan2023-08-161-1/+2
| | | | | | | | | | The `KeypairData` type from [ssh-key] at some point leaked into the keymgr API (via the `EncodableKey` trait). Instead of re-exporting just `KeypairData`, let's re-export the entire `ssh_key` crate (`EncodableKey` implementors would need additional types from `ssh_key` to construct a `KeypairData` object anyway). [ssh-key]: https://crates.io/crates/ssh-key
* Run add_warnings on all files.Nick Mathewson2023-08-041-2/+2
|
* keymgr: Replace EncodableKey::to_bytes() with SSH-specific function.Gabriela Moldovan2023-08-021-1/+1
| | | | | | | | | | | The `EncodableKey::to_bytes` function didn't make much sense, because not all keys have a canonical byte representation. This commit replaces `EncodableKey::to_bytes` with `EncodableKey::as_ssh_keypair_data`. In the future, `EncodableKey` will grow functions for encoding keys in other storage formats too. Closes #965
* keymgr: Add function for generating EncodableKeys.Gabriela Moldovan2023-07-241-1/+1
|
* keymgr: Use KeystoreId instead of a static string.Gabriela Moldovan2023-07-211-2/+2
|