Age | Commit message (Collapse) | Author |
|
KeyHandle::is_invalid
|
|
- Apply cargo intraconv.
|
|
- https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro
|
|
|
|
- These are explicitly intended for manual comparison of key ids and
fingerprints.
- See #422.
|
|
|
|
- Add a convenience function to determine if a KeyHandle contains an
invalid identifier.
|
|
- We implement Fingerprint::to_hex and KeyID::to_hex. Also
implement it for KeyHandle.
|
|
- We implement str::FromStr for Fingerprint and KeyID. Also
implement it for KeyHandle.
|
|
- Avoid the additional `fn f()`.
|
|
- See #480.
|
|
|
|
- See #627.
|
|
- Fixes #465.
|
|
- See #615.
|
|
- See #480.
|
|
- crypto::mpi::SecretKeyMaterial is the sole exception to this rule,
because we are trying to compare them in constant time. Add a
hint for clippy that this is okay.
- KeyHandle no longer implements Eq, so there is no point in
implementing Hash. Simply remove it.
- Implement Hash for SubpacketLength by hashing the serialized
form. Manually implement Eq for consistency.
- Fixes #567.
|
|
- KeyID::as_slice and KeyID::from_bytes mirror each other. This
should be reflected in the functions' names. Also, as_bytes is
more descriptive.
- Same for Fingerprint::as_slice and Fingerprint::as_bytes.
- KeyHandle::as_slice renamed for consistency.
|
|
- See #462.
|
|
- See #462.
|
|
- Avoid repeating the type name.
- Avoid self referential, trivial descriptions.
- Avoid the terms OpenPGP and Sequoia.
- Fix mistakes from the Message -> PacketPile rework.
|
|
- Replace all usages of `to_hex` with formatting string with :X
specifier.
- Fixes #456.
|
|
|
|
- Use the anyhow crate instead of failure to implement the dynamic
side of our error handling. anyhow::Error derefs to dyn
std::error::Error, allowing better interoperability with other
stdlib-based error handling libraries.
- Fixes #444.
|
|
|
|
- `From<T> for String` is implemented implicitly if `Display` is
implemented, which is the case for KeyHandle.
|
|
- Add a function to convert a KeyHandle to a String like there are
functions to convert a Fingerprint and a KeyID to a String.
|
|
|
|
- Like we have functions to convert a slice of bytes to a KeyID or a
Fingerprint, and a &Fingerprint to a KeyID, add functions to
convert a &KeyID or a &Fingerprint to a KeyHandle.
|
|
- The current PartialOrd and PartialEq implementations for
KeyHandles considers KeyIDs and Fingerprints to not be equal.
Since most users of this interface expect key identifiers to be
interchangeable, this means that they have to pull KeyHandles
apart when comparing them, like this:
match (a, b) {
(KeyHandle::Fingerprint(a),
KeyHandle::Fingerprint(b)) => a == b,
(KeyHandle::Fingerprint(a),
KeyHandle::KeyID(b)) => a.keyid() == b,
...
}
This is unergonomic, and easy to forget to do.
- The obvious fix would be to change the PartialOrd and PartialEq
implementations to do this for the user. Unfortunately, this is
not possible, because they must be transitive and two
fingerprints (a and b) maybe different but have the same keyid.
That is, the following is possible:
a == keyid, b == keyid, but a != b
That makes this comparison function non-transitive and
inappropriate for the PartialOrd and PartialEq traits.
- Nevertheless, we can implement PartialOrd and PartialEq and return
None when a keyid and a fingerprint match. (A consequence of this
is that KeyHandle can no longer implement Eq or Ord.) This
prevents users of this interface from naively comparing
KeyHandles.
- Using this interface, we provide the desired, non-transitive,
comparison function via a method (KeyHandle::aliases).
- This change means that a `KeyHandle` can no longer be used as a
Key in a HashMap. In these cases, we instead use a vector.
- Fixes #412.
|
|
|
|
|