aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-keymgr/src
Commit message (Collapse)AuthorAgeFilesLines
...
* tor-keymgr: Include the ArtiPath in PatternNotMatched.Gabriela Moldovan2024-02-192-6/+3
| | | | | | | All `KeyPathError` variants now include the `ArtiPath` that caused the error. Part of #1115
* tor-keymgr: Include ArtiPath in InvalidArtiPath (fmt).Gabriela Moldovan2024-02-191-3/+13
|
* tor-keymgr: Include ArtiPath in InvalidArtiPath.Gabriela Moldovan2024-02-192-3/+10
| | | | Part of #1115
* tor-keymgr: Include the ArtiPath in InvalidKeyPathComponentValue.Gabriela Moldovan2024-02-192-4/+8
| | | | | | The offending `ArtiPath` should be included in the error. Part of #1115
* tor-keymgr: Rename {to,from}_component to {to,from}_slug.Gabriela Moldovan2024-02-193-21/+21
| | | | | | | | | Originally, these functions converted to and from `ArtiPathComponent`. In !1931, we replaced `ArtiPathComponent` with `Slug` without renaming the conversion functions. Since we're converting to and from `Slug` now, I think it makes sense to rename them too. Part of #1115
* tor-keymgr: Make the &KeystoreId getter `as_copy`.Gabriela Moldovan2024-02-191-2/+4
|
* tor-keymgr: Test that KeyMgr::list_matching returns the right descriptors.Gabriela Moldovan2024-02-191-2/+16
|
* tor-keymgr: Test KeyMgr::{get_entry, remove_entry}.Gabriela Moldovan2024-02-191-0/+27
|
* tor-keymgr: Remove a TODO.Gabriela Moldovan2024-02-191-2/+0
| | | | | I am not so sure it makes sense to unify these functions, so let's remove the TODO.
* tor-keymgr: Remove outdated reference to KeyMgr::get_with_type.Gabriela Moldovan2024-02-191-1/+1
|
* tor-keymgr: Replace KeyMgr::get_with_type with KeyMgr::get_entry (fmt).Gabriela Moldovan2024-02-191-4/+1
|
* tor-keymgr: Replace KeyMgr::get_with_type with KeyMgr::get_entry.Gabriela Moldovan2024-02-191-8/+8
| | | | Part of #1271
* tor-keymgr: Rename KeyMgr::remove_with_type to KeyMgr::remove_entry.Gabriela Moldovan2024-02-191-6/+11
| | | | Part of #1271
* tor-keymgr: Make KeyMgr::remove_with_type take a KeystoreEntry (fmt).Gabriela Moldovan2024-02-191-4/+1
|
* tor-keymgr: Make KeyMgr::remove_with_type take a KeystoreEntry.Gabriela Moldovan2024-02-191-5/+3
| | | | | | | NB: `KeyMgr::remove_with_type` will need to be renamed to `KeyMgr::remove_entry`. Part of #1271
* tor-keymgr: Derive From for KeystoreSelector.Gabriela Moldovan2024-02-191-2/+2
| | | | We will soon use this in `KeyMgr`.
* tor-keymgr: Make KeyMgr::list_matching return `KeystoreEntry`s.Gabriela Moldovan2024-02-191-2/+7
| | | | Part of #1271
* tor-keymgr: Add KeystoreEntry.Gabriela Moldovan2024-02-192-1/+18
| | | | | | | | | | 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: Downgrade a TODO to a Note.Gabriela Moldovan2024-02-051-3/+3
| | | | | | | I don't think we need to do this right now, so I am downgrading this TODO. Part of #1115
* tor-keymgr: Make KeyMgr::remove return the removed key (fmt).Gabriela Moldovan2024-02-051-24/+28
|
* tor-keymgr: Make KeyMgr::remove return the removed key.Gabriela Moldovan2024-02-052-6/+10
| | | | Part of #1115
* tor-keymgr: Remove a TODO about rewriting KeyType.Gabriela Moldovan2024-02-051-8/+0
| | | | | | Not all algorithms have exactly 2 variants (`Public` and `Keypair`). For example, for `ed25519`, we need `Public`, `Keypair`, and `ExpandedKeypair`.
* tor-keymgr: Downgrade a TODO from a test.Gabriela Moldovan2024-02-051-1/+1
|
* tor-keymgr: Downgrade a TODO about the KeyType API.Gabriela Moldovan2024-02-051-1/+1
| | | | | | | The `KeySpecifier` argument isn't needed yet, so let's defer this for now. Part of #1115
* tor-keymgr: Downgrade a TODO about the dummy API.Gabriela Moldovan2024-02-051-1/+1
|
* tor-keymgr: Make KeyMgr::insert return the old key.Gabriela Moldovan2024-02-052-10/+19
| | | | Part of #1115
* tor-keymgr: Remove a TODO about get_from_store().Gabriela Moldovan2024-02-051-3/+1
| | | | | | Bailing on the first inaccessible keystore is correct. Part of #1115
* tor-keymgr: Rename KeyInfoExtractor to KeyPathInfoExtractor (fmt).Gabriela Moldovan2024-02-052-3/+3
|
* tor-keymgr: Rename KeyInfoExtractor to KeyPathInfoExtractor.Gabriela Moldovan2024-02-055-18/+18
| | | | | | This trait extracts a `KeyPathInfo`, not a `KeyInfo`. Part of #1115
* tor-keymgr: Derive getters for KeyPathInfo.Gabriela Moldovan2024-02-051-3/+1
| | | | Part of #1115
* tor-keymgr: Remove a TODO about renaming Keystore.Gabriela Moldovan2024-02-051-4/+0
| | | | | | I think the current naming is fine. Part of #1115
* tor-keymgr: Fix two docs linksIan Jackson2024-02-052-2/+2
| | | | (These were broken by recent MRs so don't need a CHANGELOG update in !1950.)
* tor-keymgr: Apply cargo fmt.Gabriela Moldovan2024-02-011-1/+0
|
* tor-keymgr: Expand the KeyAlreadyExists docs.Ian Jackson2024-02-011-0/+7
|
* tor-keymgr: Abolish get_or_generate_with_derived.Gabriela Moldovan2024-02-011-58/+1
|
* tor-keymgr: Rewrite get_or_generate() using of get() and generate().Gabriela Moldovan2024-02-011-6/+15
| | | | | We are about to remove `KeyMgr::get_or_generate_with_derived`, so this rewrites `KeyMgr::get_or_generate` without using it.
* tor-keymgr: Abolish KeyMgr::generate_with_derived.Gabriela Moldovan2024-02-011-155/+24
|
* tor-keymgr: Make KeyMgr::generate return the generated key.Gabriela Moldovan2024-02-011-4/+12
| | | | | | | `KeyMgr::generate` is now quite similar to `KeyMgr::get_or_generate`, so we will soon remove the latter. Part of #1074
* tor-keymgr: Add error variant for when a key shouldn't exist.Gabriela Moldovan2024-02-011-0/+5
| | | | | | | This will be returned by `KeyMgr::generate` if the key to be generated already exists and `overwrite` is `false`. Part of #1074
* tor-keymgr: Lowercase the role when building the ArtiPath.Gabriela Moldovan2024-01-311-9/+2
| | | | | | | The role is a slug, and slugs are not allowed to contain uppercase characters. Closes #1195
* tor-persist: Make all Slugs non-empty.Gabriela Moldovan2024-01-312-5/+12
| | | | | | | | This also removes a TODO regarding adding a `Nickname` type for representing `HsClientSpecifier` and `HsNickname` (we don't need it if `Slug`s are non-empty). Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1931#note_2990227
* tor-keymgr: Add roundrip test for HsId -> Slug -> HsId conversion.Gabriela Moldovan2024-01-311-1/+22
| | | | This also fixes a bug in `HsId::from_component`.
* tor-keymgr: Allow empty denotators in ArtiPath (fmt).Gabriela Moldovan2024-01-311-8/+2
|
* tor-keymgr: Allow empty denotators in ArtiPath.Gabriela Moldovan2024-01-312-11/+7
|
* tor-persist: Forbid slugs from starting with a hyphen.Gabriela Moldovan2024-01-311-3/+22
|
* tor-keymgr: Add a TODO about removing ValidatedString.Gabriela Moldovan2024-01-311-0/+2
|
* tor-keymgr: Remove the Slug tests (fmt).Gabriela Moldovan2024-01-311-4/+1
|
* tor-keymgr: Remove the Slug tests.Gabriela Moldovan2024-01-311-34/+0
| | | | These tests belong in tor_persist now.
* tor-keymgr: Abolish ArtiPathComponent.Gabriela Moldovan2024-01-314-100/+51
| | | | | | `ArtiPathComponent`s are really just `Slugs`. Part of #1193, #1092
* tor-keymgr: Make ArtiPathComponent a Slug internally (fmt).Gabriela Moldovan2024-01-312-23/+55
|