summaryrefslogtreecommitdiffstats
path: root/openpgp/src/parse
AgeCommit message (Collapse)Author
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-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-06openpgp: Notation data keys are UTF-8 strings.Justus Winter
2020-01-06openpgp: Move packet::header::ctb::* into header.Justus Winter
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-03openpgp: Drop superfluous clone.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: Move crypto::s2k::S2K to crypto.Justus Winter
- The module contains only one exported item.
2020-01-02openpgp: Do not explicitly store the subpacket tag.Justus Winter
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 Packet non-exhaustive.Justus Winter
- See #405.
2019-12-20openpgp: Make tracing more robust.Justus Winter
2019-12-20openpgp: Fix comparing streamed containers.Justus Winter
- Compute a digest over the streamed data and use it to implement equality. - Fixes #93.
2019-12-20openpgp: Use Container for Literal, Unknown.Justus Winter
- Embed Container in Literal and Unknown. This reuses code. - More importantly, Literal and Unknown now correctly implement PartialEq. - Unknown cannot implement Ord. Remove PartialOrd as well, it seems like an obscure use case to order packets. - An unfortunate consequence of Unknown not implementing Eq is that Cert cannot, because it holds unknown packets. We consider that unacceptable. - See #93.
2019-12-20openpgp: In case of parse errors, rewind the reader.Justus Winter
- Rewind the dup reader, so that the caller has a chance to buffer the whole body of the unknown packet. This is important for roundtripping signatures that we don't understand.
2019-12-20openpgp: Keep track whether a container has been streamed.Justus Winter
- If a container was streamed, we can no longer compare it to other packets. Keep track of that, and use it in Container::PartialEq. - See #93.
2019-12-20openpgp: Introduce abstraction.Justus Winter
2019-12-20openpgp: Make Container::body just a Vec.Justus Winter
- Vec::with_capacity(0) is guaranteed not to allocate, and the Option encodes no other information. This simplifies code a lot.
2019-12-20openpgp: Embed struct Container in the container packets.Justus Winter
- This allows us to implement PartialEq and related traits more selectively. See #93.
2019-12-20openpgp: Store unknown packet data in struct Unknown.Justus Winter
2019-12-20openpgp: Move fields from Common to Container.Justus Winter
2019-12-20openpgp: Store literal data in struct Literal.Justus Winter
- With this change, packet::Common is only used by container packets.
2019-12-20openpgp: Simplify key iteration interface.Neal H. Walfield
- Cert::keys_valid() is just a short-cut for Cert::keys_all().alive().revoked(false). - Remove Cert::keys_valid() and rename Cert::keys_all() to Cert::keys().
2019-12-19openpgp: Change KeyIter to return a struct instead of a tuple.Neal H. Walfield
- A tuple is just an unnamed, inflexible struct. Use a struct instead. - Fixes #400.
2019-12-18openpgp: Make SubpacketValue::EmbeddedSignature take a Signature.Justus Winter
- Now that we eagerly check the syntax, there no longer is the need for storing Unknown packets there.
2019-12-18openpgp: Tune field names to make them fit in the hex dump.Justus Winter
2019-12-18openpgp: Handle malformed subpackets when parsing.Justus Winter
- If a syntactically malformed subpacket is encountered, we do the same as for malformed packets, we turn the whole signature into an unknown packet. - Fixes #200.
2019-12-17openpgp: Make Subpacket own the data.Justus Winter
- The subpacket areas now have a vector of subpackets. Change some accessors here and there to accommodate this. - This requires bit-perfect roundtripping of subpackets so that signatures are not invalidated. - First step towards fixing #200.
2019-12-13openpgp: Rename the hash prefix to digest prefix.Justus Winter
2019-12-13openpgp: Likewise for MDC.Justus Winter
2019-12-13openpgp: Call the computed hash a digest.Justus Winter
2019-12-13openpgp: Remove hash algorithm from computed hash.Justus Winter
- The signature knows the hash algorithm.
2019-12-11openpgp: Make the PacketPileParser interface safe.Justus Winter
- Do not expose the PacketParserResult, improve error handling. - Fixes #278.
2019-12-09openpgp: Return Result from Signature::key_alive.Justus Winter
- See #371.
2019-12-09openpgp: Return Result from Signature::signature_alive.Justus Winter
- See #371.
2019-12-04openpgp: Rename KeyFlag's accessors.Justus Winter
- Fixes #359.
2019-12-04openpgp: Rename KeyIter filters.Justus Winter
- See #359.
2019-12-04openpgp: Account for clock skew when using the streaming verifiers.Neal H. Walfield
- Modify the streaming verifiers to account for clock skew when using the current time.
2019-12-03openpgp: Rename openpgp::conversions to openpgp::fmt.Justus Winter
2019-12-03openpgp: Make Literal::set_filename polymorphic over AsRef<[u8]>.Justus Winter
- And drop Literal::set_filename_from_bytes.
2019-12-03openpgp: Remove all calls to Time::canonicalize.Justus Winter
- Now that we store timestamps in OpenPGP's native encoding, the canonicalization happens when converting to it.
2019-12-03openpgp: Convert uses of Time::from_pgp.Justus Winter
2019-12-03openpgp: Use Timestamp in packet::Literal.Justus Winter
2019-11-28Call TPKs Certificates, update identifiers, documentation.Justus Winter
- Fixes #387.
2019-11-27openpgp: Fix issuer handling in the streaming verifier.Justus Winter
- To that end, make VerificationHelper::get_public_keys take KeyHandles for all the issuers.
2019-11-27openpgp: Fix Signature::get_issuer to return set of issuers.Justus Winter
- A signature can contain multiple hints as to who created the signature. Return all those hints to the caller. - Adapt all callers accordingly. - Fixes #264.
2019-11-27openpgp: Improve test case.Justus Winter