Age | Commit message (Collapse) | Author |
|
- Demonstrate dropping, buffering of all bodies, buffering of
individual bodies, and streaming.
- Fixes #540.
|
|
- 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.
|
|
- There is no variant called `None`, so having this predicate seems
wrong.
- See #489.
|
|
- See #471.
|
|
|
|
- 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.
|
|
This reverts commit 2e1eec5fe4157a391a13554ff7df3075cfe043cc.
|
|
- 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.
|
|
|
|
- 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.
|
|
- This allows us to implement PartialEq and related traits more
selectively. See #93.
|
|
|
|
- Do not expose the PacketParserResult, improve error handling.
- Fixes #278.
|
|
Newer Rust compilers requre `dyn` marking trait objects.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
|
|
- A drawback of this change is that currently AsRef<[u8]> is not
implemented for [u8; _], only for specific lengths. This is a
compiler limitation that may be lifted in the future. This
limitation required fixing some tests, notably those using
include_bytes!.
- Fixes #296.
|
|
|
|
|
|
- This is the result of running `cargo fix --edition`, with some
manual adjustments.
- The vast majority of changes merely qualify module paths with
'crate::'.
- Two instances of adding an anonymous pattern to a trait's
function.
- `async` is a keyword in Rust 2018, and hence it needs to be
escaped (e.g. in the case of the net::r#async module).
- The manual adjustments were needed due to various shortcomings of
the analysis employed by `cargo fix`, e.g. unexpanded macros,
procedural macros, lalrpop grammars.
|
|
- Use the new framework instead of including the files everywhere.
|
|
- Fixes #267.
|
|
|
|
- For example, `buffered_reader::BufferedReaderMemory` is now called
`buffered_reader::Memory`. This makes the type names less unwieldy.
- Fixes #206.
|
|
- Rename functions that consume their receiver but are called
.to_...() to .into_...().
- For the packet types, simply drop the conversion function in favor
of using the From trait.
- Fixes #160.
|
|
- Trait Parse introduces a uniform interface to parse packets,
messages, keys, and related data structures.
|
|
|
|
- Change PacketParser::next and PacketParser::recurse to not return
the packets' depths. Instead, require the caller to query them
using accessor functions, if they are needed (they usually
aren't).
|
|
- The packet parser's recursive depth can be computed from the path,
which we now track. As such, don't track the recursive depth
separately, just derive it from the path.
|
|
- Use the new reader either directly, or make sure that calls to
from_file(..) use it down the call chain.
|
|
- This logically groups the returned values, and makes it easier to
ignore both packet-related values.
- See #27.
|
|
- In the future, we want to return some summary information about a
parsed packet sequence after the packet sequence is fully parsed.
Currently, PacketParser::next() and PacketParser::recurse()
consume the PacketParser and return None on EOF. Thus, even if
the summary information were stored in the PacketParser, it
becomes inaccessible on EOF.
- This change introduces a new type, PacketParserResult, that
contains either a PacketParser or a PacketParserEOF.
PacketParserEOF is returned on EOF instead of None. Since it is a
struct, it can hold only any information that we want to return to
the caller.
|
|
Missing doc comments on public functions and types now procude a
warning. Also adds all missing comments.
|
|
- This helps to reduce the trusted computing base if compression is
not needed.
- This makes it easier to fuzz Sequoia, previously the fuzzer was
doing a great job creating compression bombs that triggered the
fuzzers timeout.
- Currently, the cargo workspace feature does not propagate
--no-default-features, but it is possible to depend on the openpgp
crate with `default-features = false`.
- Unfortunately, a lot of test cases include compressed packages.
This change conditionally disables these tests.
|
|
|