Age | Commit message (Collapse) | Author |
|
- Add a buffered-reader-based function to trait Parse. This allows
us to manipulate the buffered reader stack before and after
parsing, e.g. to parse several armored objects in one stream. The
CertParser also does this, but uses internal interfaces for that.
|
|
- This is an internal interface that uses our reader stack's
cookie. We need this to traverse the buffered reader stack. We
did not, however, expose it as an external interface, because we
didn't want to bake in the cookie type into the API.
- Having a public API that operates on buffered readers is
convenient: the current Parser::from_reader operates on
io::Readers, and will most likely construct a
buffered_reader::Generic from it. This will eagerly buffer some
data, making this interface unsuitable if you want to read in one
artifact (e.g. an MPI) without consuming more data.
- Renaming the internal functions gives us a chance to add a more
general buffered reader interface.
|
|
- Previously, NotAsFarAsWeKnow was interpreted as identifier making
the if let binding irrefutable.
- Fixes 7afee60b7cf0f19559bfccd8c42fdc77f6b9c655.
|
|
|
|
- Fixed with the help of clippy::needless_borrow.
|
|
- Apply cargo intraconv.
|
|
|
|
- https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
|
|
- At some point, invalid self-signatures would be mis-classified as
third-party certifications by Cert::canonicalize. As a side-effect,
invalid self-revocations would be considered third-party
revocations, changing the certificates revocation status to
CouldBe. Confusingly, also changing the digest prefix would break
this mis-classification, resulting in a revocation status of
NotAsFarAsWeKnow.
- The underlying issue was fixed in
7afee60b7cf0f19559bfccd8c42fdc77f6b9c655.
- Add a test that demonstrates that bad signatures are now
recognized as such, and that the confusing behavior previously
observed is now consistent.
- Fixes #486.
|
|
- Avoid the additional `fn f()`.
|
|
- See #480.
|
|
- This way the entire `BufferedReader<C>` will be `Send` and `Sync`.
- Modify all other crates accordingly.
- See #615.
|
|
- See #615.
|
|
|
|
- See #627.
|
|
- This allows us to store verification errors with the signatures.
- See #619.
|
|
- Change `Cert::into_packets` to return the underlying packets.
That is don't drop secret key material like `Cert::serialize`
does.
|
|
- See #480.
|
|
- See #480.
|
|
- Previously, a bad self-signature was mistakenly classified as
third-party-signature by the hash-prefix heuristic. For example,
a missing primary key binding signature on a self-signature causes
the verification to fail, but the hash-prefix heuristic (which
does not consider the missing primary key binding signature)
attributes it to the subkey as a third-party-signature.
- Use issuer information to distinguish between self-signatures and
third-party-signatures, then use this information to limit the
sorting heuristic to the corresponding buckets.
|
|
- Align our examples with how the code in the examples of the Rust
standard library is formatted. We are writing examples in the
hope that downstream users will copy fragments of them, therefore
using idiomatic formatting in these snippets is important.
|
|
- Previously, these method withheld information in the EOF case (and
in case of `map` this loss is irrecoverable). Fix this by
returning a Result instead.
|
|
- See #471.
|
|
- There is no variant called `None`, so having this predicate seems
wrong.
- See #489.
|
|
- Previously, inspecting the first packet was weird, because only
.next() and .recurse() returned a reference to the underlying
packet parser. Having to call .next() to get the first package
differs from how the packet parser behaves (though I have to admit
that it aligns with Iterator::next()).
- Instead of returning the packet parser result from .next() and
.recurse(), make PacketPileParser deref to it. This allows to
inspect the first packet without weirdly calling .next() first,
and improves code using the PPP in a parsing loop. It also
simplifies the implementation, removing the need for the
`returned_first` hack.
|
|
- Provide a conversion from `PacketPile` to `Vec<Packet>` using
idiomatic interfaces.
- It would be nicer to implement `IntoIterator`, but
`PacketPile::into_children` doesn't have a concrete type (it
returns an `impl Iterator`).
|
|
- Drop `Cert::from_packet_pile`.
- Fixes #462.
|
|
- Rename `Cert::revoked`, `ValidCert::revoked`,
`ValidAmalgamation::revoked`, and `ComponentBundle::revoked` to
revocation_status to more accurately match what it does.
- Don't rename `ValidComponentAmalgamationIter::revoked` or
`ValidKeyAmalgamationIter::revoked`. They don't return the
revocation status; they check whether the key is revoked.
|
|
This reverts commit 2e1eec5fe4157a391a13554ff7df3075cfe043cc.
|
|
|
|
- Add doctest example to PacketPile.
- Add doctest example to `PacketPile::path_ref`.
- Add doctest example to `PacketPile::path_ref_mut`.
- Add doctest example to `PacketPile::descendants`.
- Add doctest example to `PacketPile::children`.
- Add doctest example to `PacketPile::into_children`.
- Fixes #467.
|
|
- This avoids the partial implementation imitating
std::option::Option, replacing it with std::result::Result.
- As a benefit, std::result::Result is in the prelude, simplifying a
lot of parsing loops.
|
|
|
|
- Writers should be finalized, builders should be built.
|
|
|
|
|
|
|
|
|
|
|
|
`TryFrom<PacketParserResult>`
|
|
- Avoid repeating the type name.
- Avoid self referential, trivial descriptions.
- Avoid the terms OpenPGP and Sequoia.
- Fix mistakes from the Message -> PacketPile rework.
|
|
- Implement Default for PacketPile, add internal accessor for the
top-level.
|
|
|
|
- Packet bodies can now be either unprocessed (e.g. compressed,
encrypted), processed (e.g. uncompressed, decrypted), or
structured (e.g. parsed into packets).
- Make the container types deref to Container, and container deref
to packet bodies.
- This cleanly avoids the confusion when serializing containers: We
can serialize compressed data packets with either body, but we can
only serialize encryption containers with unprocessed bodies.
- Fixes #187.
|
|
- Likewise for the test.
|
|
- 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.
|
|
- 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.
|
|
|
|
- This allows us to implement PartialEq and related traits more
selectively. See #93.
|
|
|