aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-key-forge/src
Commit message (Collapse)AuthorAgeFilesLines
...
* tor-key-forge: Add into_erased impl for KeystoreItem.Gabriela Moldovan2024-12-041-1/+12
| | | | This will be used by the `Keystore` implementations.
* tor-key-forge: Replace EncodableItem::key_type() with item_type().Gabriela Moldovan2024-12-043-19/+15
| | | | | This function now returns a `KeystoreItemType`, enabling us to represent certs as `EncodableItem`s.
* tor-key-forge: Let declare_item_type macro generate the tests.Gabriela Moldovan2024-12-041-32/+52
| | | | | This enables us to auto-generate tests for all the supported key/cert file extensions.
* tor-key-forge: Remove no longer needed KeyType::Unknown variant.Gabriela Moldovan2024-12-041-28/+3
| | | | | Items that have an unrecognized file extension now get mapped to `KeystoreItemType::Unknown`.
* tor-key-forge: Export KeystoreItem.Gabriela Moldovan2024-12-041-1/+1
|
* tor-key-forge: Rename EncodableKey to EncodableItem.Gabriela Moldovan2024-12-043-19/+19
| | | | | | | | 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)
* tor-key-forge: Add a KeystoreItem type to replace SshKeyData.Gabriela Moldovan2024-12-041-1/+22
| | | | | | | The `EncodableKey` trait will soon be extended to support encoding certificates too (in addition to keys), so we need a type to represent an object that is either a key or a certificate (in other words, an encodable *item*).
* tor-key-forge: Add an encodable cert type.Gabriela Moldovan2024-12-042-0/+25
|
* tor-key-forge: Add a ToEncodableCert trait.Gabriela Moldovan2024-12-042-1/+50
|
* tor-keymgr: Introduce a KeystoreItemType to replace KeyType.Gabriela Moldovan2024-12-042-6/+136
| | | | | Soon the keystore will be able to store certs too, so we need something other than `KeyType` to represent the "type" of a keystore entry.
* Resolve clippy::empty_line_after_doc_comments warnings.Nick Mathewson2024-12-031-1/+1
| | | | These are new in Rust 1.83.
* add_warnings, *: Allow clippy::needless_lifetimesNick Mathewson2024-12-031-0/+1
| | | | | | | | 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.
* tor-key-forge: Fix typo in documentation.Gabriela Moldovan2024-10-171-2/+2
|
* tor-key-forge: Replace fully-qualified path with import.Gabriela Moldovan2024-10-171-2/+2
| | | | | `KeypairData` is already in scope, so there's no need to fully-qualify it.
* tor-key-forge: Reformat derives for readability.Gabriela Moldovan2024-10-171-2/+4
|
* tor-key-forge: Reformat a long line for readability.Gabriela Moldovan2024-10-171-1/+4
|
* tor-key-forge: Remove now-outdated TODO.Gabriela Moldovan2024-10-081-3/+0
|
* tor-key-forge: Remove unused function.Gabriela Moldovan2024-10-081-8/+0
|
* tor-key-forge: Use the new "restricted discovery" terminology.Gabriela Moldovan2024-10-031-4/+4
| | | | Part of #1476
* key-forge: Add curve25519 key wrapper macroDavid Goulet2024-09-191-8/+161
| | | | | | Closes #1619 Signed-off-by: David Goulet <[email protected]>
* tor-key-forge: encapsulate `define_ed25519_keypair` macro depsSteven Engler2024-09-182-38/+43
| | | | | | | | | This re-exports the types/traits needed by the `define_ed25519_keypair` macro so that the macro caller doesn't need to import a bunch of extra packages in its Cargo.toml that it doesn't use, and so that the caller doesn't need a `use prelude::*` before invoking the macro. This makes the macro nicer to use for the caller, and should prevent the macro from causing "cannot find ... in this scope" errors.
* key-forge: Fix a comment with the wrong nameDavid Goulet2024-09-181-2/+2
| | | | Signed-off-by: David Goulet <[email protected]>
* key-forge: Support extra docs and attributes to ed25519 keypairDavid Goulet2024-09-181-3/+7
| | | | Signed-off-by: David Goulet <[email protected]>
* key-forge: Add helper function and implement traitsDavid Goulet2024-09-182-12/+46
| | | | | | | | | | | | | | | Implement the signature::Signer and Ed25519PublicKey trait so the ed25519 keypair wrapper can be easily used for certificate creation. This also adds a to_ed25519_id() so we can get a Ed25519Identity which is an object used around. Finally, add a prelude module as the list of imports started to grow a bit out of control. Part of #1604 Signed-off-by: David Goulet <[email protected]>
* tor_key_forge::traits::ToEncodableKey: add KeyPair associated typeAdam Joseph F0B74D717CDE8412A3E0D4D5F29AC8080DA8E1E02024-09-092-1/+23
| | | | | | | | | | This comment adds a second associated type `KeyPair` to ToEncodableKey. For a `ToEncodableKey` which represents a (secret) KeyPair, this type is Self. For a `ToEncodableKey` which represents a public key, this is the `ToEncodableKey` whose `Key` is the pair of which this is the public part. This is essentially a "type level pointer" from the ToEncodableKey for a public key to the ToEncodableKey for its secret key.
* Rename tor-keys crate to tor-key-forgeDavid Goulet2024-09-046-0/+1077
Signed-off-by: David Goulet <[email protected]>