summaryrefslogtreecommitdiffstats
path: root/openpgp/src
AgeCommit message (Collapse)Author
2020-01-08openpgp: Improve PartialEq for OnePassSig3.Justus Winter
- Previously, we compared the serialized forms. This, however, involves making heap allocations. For me, that breaks the expectation that equality should be free of side-effects, and fast. Compare the fields instead.
2020-01-08openpgp: Include a reference time in KeyAmalgamation.Neal H. Walfield
- Including the reference time in the KeyAmalgamation structure rather than having the user supply it to the individual methods (like `KeyAmalgamation::alive`) helps ensure that the key is used consistent. For instance, this makes it harder to mistakenly query key's liveness at time t, but then use the current time to determine the key's capabilities.
2020-01-07Fix broken links in the documentation.Justus Winter
2020-01-07openpgp: Improve documentation.Justus Winter
2020-01-07openpgp: Include the signing key's amalgamation in results.Justus Winter
- Only the amalgamation allows proper checking of a key's properties, the binding signature alone isn't sufficient. - Fixes #408.
2020-01-07openpgp: Document that names may change.Justus Winter
2020-01-07openpgp: Do not Deref to Common for the container types.Justus Winter
- This was only implemented for the container types because previously, the container logic was implemented in Common. That is no longer the case and explicit forwarders for the Container type are added.
2020-01-07openpgp: Mark enum message::Token non-exhaustive.Justus Winter
- See #405.
2020-01-07openpgp: Mark enum MessageParserError non-exhaustive.Justus Winter
- See #405.
2020-01-07openpgp: Improve document of the regular expression subpacket.Neal H. Walfield
- The regular expression subpacket includes a trailing NUL byte. More explicitly describe how Sequoia handles that byte (it strips it on parsing and adds in on serialization).
2020-01-06openpgp: Use KeyAmalgamation::for_xxx instead of building a KeyFlagsNeal H. Walfield
- Use the convenient functions KeyAmalgamation::for_storage_encryption, KeyAmalgamation::for_transport_encryption, etc., instead of building up a KeyFlags and then calling KeyAmalgamation::key_flags. - This pattern requires less boilerplate.
2020-01-06openpgp: Make hex::Dumper::write* polymorphic.Justus Winter
- See #229.
2020-01-06openpgp: Make all subpacket setters polymorphic over &[u8] and &str.Justus Winter
- See #229.
2020-01-06openpgp: Make Builder::{add,set}_notation polymorphic.Justus Winter
- See #229.
2020-01-06openpgp: Make Builder::set_regular_expression polymorphic, doc fix.Justus Winter
- See #229.
2020-01-06openpgp: Make SubpacketArea::notation polymorphic.Justus Winter
- See #229.
2020-01-06openpgp: Make NotationData::new polymorphic.Justus Winter
- See #229.
2020-01-06openpgp: Improve impl fmt::Debug for NotationDataFlags.Justus Winter
2020-01-06openpgp: Notation data keys are UTF-8 strings.Justus Winter
2020-01-06openpgp: Move packet::header::ctb::* into header.Justus Winter
2020-01-06openpgp: Fix link.Justus Winter
2020-01-06openpgp: Consistently use key_flags.Justus Winter
- Most of the code uses 'key_flags', and this is consistent with SubpacketArea::key_flags using 'key' as a prefix for key-related subpackets. - Fixes #249.
2020-01-06openpgp: Pass a timestamp to the KeyIter instead of each filter.Neal H. Walfield
- KeyIter::revoked and KeyIter::key_flags (and its variants) didn't take a time stamp so they could only be used for filtering keys based on their current state, not their state at some time in the past. Adding a time stamp to each of the filters would have fixed the problem, but it would have made the interface ugly: callers always want the same time stamp for all filters. - Split KeyIter into two structures: a KeyIter and a ValidKeyIter. - Add KeyIter::policy. It takes a time stamp, which is then used for filters like `alive` and `revoked`, and it returns a ValidKeyIter, which exposes filters that require a time stamp.
2020-01-04openpgp: Change KeyIter::key_flags to not require an owned KeyFlags.Neal H. Walfield
- Instead of taking a `KeyFlags`, change `KeyIter::key_flags` to take a `Borrow<KeyFlags>`. - Update callers to pass a reference instead of cloning.
2020-01-04openpgp: Improve KeyIter documentation.Neal H. Walfield
2020-01-04openpgp: Improve documentation for KeyIter::revoked.Neal H. Walfield
- Explain why this function exists even though it is not policy free. - Include an example showing how to implement a different revocation policy using `Iterator::filter`.
2020-01-03openpgp: Drop superfluous clone.Justus Winter
2020-01-03openpgp: Rename hash_file to hash_reader, improve documentation.Justus Winter
2020-01-03openpgp: Update documentation.Justus Winter
2020-01-03openpgp: Abbreviate CompressedData::algorithm to algo.Justus Winter
2020-01-03openpgp: Simplify SignatureGroup::hashes.Justus Winter
- The hash context knows the algorithm now.
2020-01-03openpgp: Simplify crypto::hash_file.Justus Winter
- The context knows the algorithm now.
2020-01-03openpgp: Move crypto::s2k::S2K to crypto.Justus Winter
- The module contains only one exported item.
2020-01-03openpgp: Make Protected::into_vec private, remove from SessionKey.Justus Winter
2020-01-03openpgp: Fix PartialEq, Hash for mem::Encrypted.Justus Winter
- Fixes PartialEq for Password. - See #92.
2020-01-03openpgp: Explicitly implement Eq and Hash if PartialEq is.Justus Winter
- If we don't derive PartialEq, then deriving hash is unsafe. - See #92.
2020-01-02openpgp: Correctly handle padding on KeyServerPreferences, add test.Justus Winter
2020-01-02openpgp: Correctly handle padding on Features, add rountrip test.Justus Winter
2020-01-02openpgp: Fix impl std::hash::Hash for KeyFlags.Justus Winter
2020-01-02openpgp: Fix roundtripping of KeyFlags, add test.Justus Winter
- In particular, preserve any padding.
2020-01-02openpgp: Align function name.Justus Winter
2020-01-02openpgp: Make KeyFlags::new polymorphic, improve KeyFlags::default.Justus Winter
2020-01-02openpgp: Do not explicitly store the subpacket tag.Justus Winter
2020-01-02openpgp: Simplify now infallible function SubpacketValue::tag.Justus Winter
2020-01-02openpgp: Mark enum SignatureValue non-exhaustive.Justus Winter
- See #405.
2020-01-02openpgp: Change SubpacketValue::Unknown to store the tag.Justus Winter
- Makes it possible to construct unknown packets with arbitrary subpacket tags. - Fixes a regression.
2020-01-02openpgp: Mark packet version enums as non-exhaustive.Justus Winter
- Fixes #405.
2020-01-02openpgp: Mark enum Error non-exhaustive.Justus Winter
- See #405.
2020-01-02openpgp: Mark enum Packet non-exhaustive.Justus Winter
- See #405.
2020-01-02openpgp: Make serialize::PacketRef private.Justus Winter