Age | Commit message (Collapse) | Author |
|
- We should not even suggest to use unwrap in our examples.
|
|
|
|
- Support serializing `CompressedData` and `Literal` packets.
|
|
|
|
- When serializing packets, we need to convert the symbolic
representation of a Tag to its numeric representation.
|
|
|
|
- Given that `BufferedReader`s now track what packet they belong to,
we no longer have to have a fixed number of filters per container
/ packet. This means we can even have 0, which is useful for
non-decompression compressed packets, and packets with an
Indeterminate body length.
- Note: this change should also bring the parser closer inline with
GnuPG with respect to decompression packets with an indeterminate
length: now when we pop a compressed packet with an indeterminate
length, we will drain it until the decompressor returns EOF and
not until the end of the message, since we no longer need to push
an "unlimited" limitor to make sure we had something to pop.
|
|
- Store the level that a `BufferedReader` applies to in the
`BufferedReader`'s cookie. This is useful, because when we pop a
container, figuring out how many filters it pushed on the
`BufferedReader` stack is fragile. Using this information, we
just remove `BufferedReader`s until we are the right level.
- This mechanism also requires passing the recursion depth to the
container parser functions. Do it for all of the packet parser
functions and set the recursion depth there.
|
|
- We want to associate some data with a BufferedReader instance.
Because a BufferedReader points to another BufferedReader, we
can't use a wrapper object. This change provides a mechanism to
store any required data inside the actual `BufferedReader`. Note:
this is a zero-cost abstraction. If no data needs to be stored,
then there is no cost.
|
|
- e03cca1d751d907c490d1f3d145086d391639979 removed the `use
std::str` clause, which was not actually used by the main code,
but was used by a test case. Restore the import, but only when it
is actually needed.
|
|
|
|
|
|
This reverts commit 217e7595584418e68c8c634533b72a59a76ee02d.
This commit was actually a part of
e0354af157e31421c2c65310b9f49d3f87d66814 and
217e7595584418e68c8c634533b72a59a76ee02d reverted it. Whoops.
|
|
- Using openpgp::Message::from_reader is convenient, but buffers the
whole message. Use a `PacketParser` so that we only need to
buffer a single packet. (This can be improved by streaming
literal data packets.)
- Improve the output by indenting packets according to their
recursion depth.
|
|
- We'd like to use `?` to handle error results rather than using
unwrap. Put the main function into a helper function that returns
a Result and have main call that function, and print any error.
|
|
|
|
|
|
|
|
- Make PacketCommon's iterator interface consistent with the
`Message` and `Container` iterator interfaces.
|
|
- Provide module-level documentation.
- Mention the `MessageParser` interface when comparing interfaces.
- Improve text.
|
|
- Change `PacketParser::next()` and `PacketParser::parse()` to
return the absolute recursion depth of the old packet and the new
packet parser instead of just returning the relative position of
the `PacketParser` with respect to the old packet.
|
|
- PacketParser::buffer_unread_content should set
PacketParser::content_was_read. This is set when reading directly
from the PacketParser, but not when using PacketParser::reader.
Use the former.
|
|
- `PacketParser` has the disadvantage that the caller needs to
assemble the `Message`. `Message::deserialize` has the
disadvantage that packets cannot be streamed, whether to recurse
is a global property of the parser, and parsing cannot be aborted.
`MessageParser` solves these problems with a nice interface. It
is a tiny bit more expensive than `Message::deserialize`, however.
|
|
|
|
|
|
|
|
|
|
- For some reason, I forgot to explicitly assign the OnePassSig tag
a numeric value. Let's be explicit.
|
|
|
|
|
|
- Provide Tag::from_numeric and PacketLengthType::from_numeric to
convert a numeric value to a Tag or PacketLengthType,
respectively.
- Update users.
|
|
- A command line tool to interact with Sequoia. Useful for
debugging and development.
|
|
- Subpackets are returned to users, and are only useful if the
content is readable.
|
|
|
|
- Improve the documentation.
- Re-export 'openpgp'.
- Re-export the other crates without prefix.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- The partial_body module is only used by parse. So, this is the
right place.
- Also, there is now no reason for body_length_new_format to be
public. So, make it private.
|
|
- Most callers won't actually have a `BufferedReader`, so giving the
nice name to this interface doesn't make sense. Also, the new
name is more consistent with PacketParser and PacketParserBuilder.
- Update users.
|
|
- `Message::from_reader` already accepts an object implementing a
`std::io::Read` interface.
- Update users of `Message`.
|
|
|
|
- To make it easier to understand what the PacketParser is doing,
add an option trace its execution.
|
|
- Add a setting to the PacketParser to enable buffering of unread
content when the PacketParser is advanced.
|
|
- Fix how the amount of data to consume is computed in
BufferedReaderMemory::data_consume.
|
|
- To support the easy propagation of multiple settings and their
clear separation from the other state, bundle all settings in a
struct.
|
|
|