summaryrefslogtreecommitdiff
path: root/crates/tor-cert/tests
Commit message (Collapse)AuthorAgeFilesLines
* Convert to the latest versions of dalek-cryptographyNick Mathewson2023-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main changes that we have to adjust for are as follows: * In x25519-dalek: * `StaticSecret` is now behind a feature. * `StaticSecret::new` is deprecated in favor of `StaticSecret::random_from_rng`. * StaticSecret no longer does its own clamping. * In ed25519-dalek: * `SecretKey` has (in effect) been renamed to `SigningKey`. The name `SecretKey` is now an alias for `[u8; 32]`. * `SigningKey` is effectively a keypair, since it contains a public key as well. * `PublicKey` has been renamed to `VerifyingKey`. * The functions to extract a signing key and verifying key have been renamed as you might expect. * `ExpandedSecretKey` has been moved to `hasmat` and no longer implements `sign`. * `ExpanededSecretKey` now has as its elements a scalar and a hash prefix. * Various functions that took `&[u8]` now take `&[u8; N]`. * We no longer need a wrapper for older versions of rand. There is a single test in tor-keymgr that does not pass. I've marked it as ignore for now, in hopes that @gabi-250 can help me figure it out. This closes #808. There are several changes I want to make before we merge, however. They are marked with TODO DALEK.
* test: provide a test for expired certificatesEmil Engler2023-08-101-0/+37
| | | | | This commit implements a test for an expired Ed25519 certificate within the `tor_cert` crate.
* Replace usage of KeyUnknownCert::check_key.Nick Mathewson2023-05-162-4/+4
|
* Change tor_bytes::Error::BadMessage to a Cow.Nick Mathewson2023-02-091-4/+4
| | | | | | | | | | Actually, to avoid making a breaking change, I'm deprecating BadMessage and creating a new InvalidMessage variant that takes a Cow. This way I don't need to track every crate that re-exposes tor_bytes::Error and call this a breaking change in those. Making this change will allow tor_bytes errors to be much more helpful.
* Tackling issue #663 (Use humantime in tests)coral2022-12-121-6/+6
|
* change usage of PublicKey to Ed25519 in tor-certtrinity-1686a2022-07-232-5/+5
| | | | and propagate to other affected crates
* change check_key to take a Option<&_> instead of &Option<_>trinity-1686a2022-07-232-4/+4
|
* tor-proto: split and elaborate tor_bytes::Error instancesNick Mathewson2022-06-231-2/+3
| | | | | | | | | Some of these were for decoding particular objects (we now say what kind of objects), and some were unrelated tor_cert errors that for some reason we had shoved into a tor_bytes::Error. There is now a separate tor_cert::CertError type, independent from tor_cert's use of `tor_bytes::Error` for parsing errors.
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-272-0/+205
This will cause some pain for now, but now is really the best time to do this kind of thing.