summaryrefslogtreecommitdiff
path: root/crates/tor-keymgr/src/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
* tor-keymgr: added initial implementation for in-memory ArtiEphemeralKeystoreRichard Pospesel2024-04-101-0/+1
|
* tor-keymgr: Export KeyMgrBuilderError.Gabriela Moldovan2024-04-081-1/+1
| | | | | | `KeyMgrBuilderError` is used in `KeyMgrBuilder`'s public API. See https://gitlab.torproject.org/tpo/core/arti/-/issues/1358#note_3016025
* derive-deftly: Call pub_template_semver_checkIan Jackson2024-04-031-0/+2
| | | | | | | 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.
* Switch to derive-deftlyIan Jackson2024-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* deny clippy::unchecked_duration_subtractiontrinity-1686a2024-02-291-0/+1
|
* 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.