aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-key-forge
Commit message (Collapse)AuthorAgeFilesLines
...
* clippy: deny `mod_module_files`Steven Engler2025-01-061-0/+1
| | | | | | Denies 'mod.rs' files for consistency. https://rust-lang.github.io/rust-clippy/master/index.html#mod_module_files
* Run "fixup-features" in preparation for release.Nick Mathewson2025-01-061-1/+1
|
* tor-hscrypto: Move encodable key trait impls from tor-key-forge.Gabriela Moldovan2024-12-112-114/+0
| | | | | | | | | This enables us to get rid of the tor-key-forge -> tor-hscrypto dependency, partially addressing the TODO from `tor_key_forge::traits`. This commit is mostly code motion. Best reviewed with `--color-moved`. See also #1778
* tor-key-forge: Abolish the HasKind impl of Error.Gabriela Moldovan2024-12-102-14/+1
| | | | | | | We can't possibly know the `ErrorKind` of such an error, unless we know where the unsupported key came from. Since we can't know this, we should let a higher level crate (like `tor-keymgr`) decide the `ErrorKind` instead.
* tor-key-forge: Enable use of tor-cert experimental APIs.Gabriela Moldovan2024-12-041-1/+1
|
* tor-key-forge: Export certificate-related types.Gabriela Moldovan2024-12-041-0/+5
|
* tor-key-forge: Implement KeystoreItem::item_type.Gabriela Moldovan2024-12-042-2/+9
|
* tor-key-forge: s/EncodableKey/EncodableItem in documentation.Gabriela Moldovan2024-12-041-11/+11
|
* tor-keymgr: Add KeyMgr::get_key_and_cert() (fmt).Gabriela Moldovan2024-12-041-1/+4
|
* tor-keymgr: Add KeyMgr::get_key_and_cert().Gabriela Moldovan2024-12-041-1/+1
|
* tor-key-forge: Implement EncodableItem for Tor ed25519 certs.Gabriela Moldovan2024-12-042-2/+17
| | | | | This will enable us to store `tor_cert::EncodedEd25519Cert`s in the keystore.
* tor-keymgr: Replace as_ssh_key_data with as_keystore_item (fmt).Gabriela Moldovan2024-12-041-1/+2
|
* tor-keymgr: Replace as_ssh_key_data with as_keystore_item.Gabriela Moldovan2024-12-042-17/+16
|
* 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-043-0/+26
|
* 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.
* Bump all the unstable tor- and arti- crates to 0.25.0.Gabriela Moldovan2024-12-021-5/+5
| | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.25.0 done ```
* cargo: Update `thiserror` to `2`Clara Engler2024-11-121-1/+1
|
* Bump unstable tor-* and arti-* crates to 0.24.0Ian Jackson2024-10-301-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cargo set-version -p tor-async-utils 0.24.0 cargo set-version -p tor-basic-utils 0.24.0 cargo set-version -p tor-bytes 0.24.0 cargo set-version -p tor-cell 0.24.0 cargo set-version -p tor-cert 0.24.0 cargo set-version -p tor-chanmgr 0.24.0 cargo set-version -p tor-checkable 0.24.0 cargo set-version -p tor-circmgr 0.24.0 cargo set-version -p tor-config 0.24.0 cargo set-version -p tor-config-path 0.24.0 cargo set-version -p tor-consdiff 0.24.0 cargo set-version -p tor-dirclient 0.24.0 cargo set-version -p tor-dirmgr 0.24.0 cargo set-version -p tor-error 0.24.0 cargo set-version -p tor-general-addr 0.24.0 cargo set-version -p tor-geoip 0.24.0 cargo set-version -p tor-guardmgr 0.24.0 cargo set-version -p tor-hsclient 0.24.0 cargo set-version -p tor-hscrypto 0.24.0 cargo set-version -p tor-hsrproxy 0.24.0 cargo set-version -p tor-hsservice 0.24.0 cargo set-version -p tor-key-forge 0.24.0 cargo set-version -p tor-keymgr 0.24.0 cargo set-version -p tor-linkspec 0.24.0 cargo set-version -p tor-llcrypto 0.24.0 cargo set-version -p tor-log-ratelim 0.24.0 cargo set-version -p tor-memquota 0.24.0 cargo set-version -p tor-netdir 0.24.0 cargo set-version -p tor-netdoc 0.24.0 cargo set-version -p tor-persist 0.24.0 cargo set-version -p tor-proto 0.24.0 cargo set-version -p tor-protover 0.24.0 cargo set-version -p tor-ptmgr 0.24.0 cargo set-version -p tor-relay-crypto 0.24.0 cargo set-version -p tor-relay-selection 0.24.0 cargo set-version -p tor-rpcbase 0.24.0 cargo set-version -p tor-rtcompat 0.24.0 cargo set-version -p tor-rtmock 0.24.0 cargo set-version -p tor-socksproto 0.24.0 cargo set-version -p tor-units 0.24.0 cargo set-version -p arti-client 0.24.0 cargo set-version -p arti-relay 0.24.0 cargo set-version -p arti-rpc-client-core 0.24.0 cargo set-version -p arti-rpcserver 0.24.0
* 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
* Bump arti- and tor- crates to 0.23.0Nick Mathewson2024-09-301-5/+5
| | | | | | | | | | | | | | Per our policy, every one of these gets a minor bump. Generated with: ``` for crate in $(./maint/list_crates | grep '^\(tor\|arti\)-' ); do cargo set-version --bump minor -p $crate; done ``` (Note the use of `-` at the end end of the grep pattern to prevent matching the `arti` crate.)
* Merge branch 'msrv-1.77-and-rusqlite-update' into 'main'David Goulet2024-09-261-1/+1
|\ | | | | | | | | Upgrade MSRV to 1.77 , and rusqlite to 0.32.1 See merge request tpo/core/arti!2451
| * Upgrade MSRV to 1.77Nick Mathewson2024-09-251-1/+1
| | | | | | | | This will allow us to upgrade to the latest version of rusqlite.
* | Upgrade to derive_more version 1.0.0Nick Mathewson2024-09-251-1/+1
|/ | | | | | The `derive_more` crate broke backward compatibility with this version, so this change involved quite a few manual fixups. With luck, they'll keep compatibility for some while in the future.
* 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-183-12/+48
| | | | | | | | | | | | | | | 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]>
* Bump MSRV from 1.70 to 1.75.Wesley Aptekar-Cassels2024-09-161-1/+1
|
* 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-048-0/+1135
Signed-off-by: David Goulet <[email protected]>