summaryrefslogtreecommitdiffstats
path: root/openpgp/src/message
AgeCommit message (Collapse)Author
2024-01-22openpgp: Add Parse::from_buffered_reader.Justus Winter
- 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.
2023-10-26openpgp: Upgrade lalrpopPeter Michael Green
- Fixes #1060.
2022-11-18openpgp: Improve tests with marker packets.Justus Winter
2022-05-06autocrypt, net: openpgp: Rewrite all usages of `Reader::new`.Wiktor Kwapisiewicz
2022-03-28openpgp: Explicit SEIP packet version in the message parser.Justus Winter
- In order to deal with version 2 SEIP packets, we first need to be explicit about the packet version in the message parser. - Rename the token and grammar rules, pass in a version to MessageParser::push.
2022-03-28openpgp: Clarify that message::Token is not covered by SemVer.Justus Winter
- Do this using a deprecation so that anyone using it will get a compiler warning. - Revert this change once message::Token is private. - See #836.
2021-11-29Prefer vec! macro.Nora Widdecke
- The vec![] macro is more performant and often easier to read than multiple push calls. - Allow push to a Vec straight after creation in tests. Performance is not that great of an issue in tests, and the fix would impact legibility. - Found by clippy::vec_init_then_push.
2021-09-21Avoid matching on &Foo, when a plain Foo pattern worksLars Wirzenius
The extra & in a pattern (match arm or if let) is unnecessary and only makes the code harder to read. In most places it's enough to just remove the & from the pattern, but in a few places a dereference (*) needs to be added where the value captured in the pattern is used, as removing the & changes the type of the captured value to be a reference. Overall, the changes are almost mechanical. Although the diff is huge, it should be easy to read. The clippy lint match_ref_pats warns about this. See: https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats
2021-08-27Convert markdown to intra-doc links.Nora Widdecke
- Apply cargo intraconv.
2021-04-09Lint: Do not .clone a Copy type.Nora Widdecke
- https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
2021-04-09Lint: Use is_empty().Nora Widdecke
- https://rust-lang.github.io/rust-clippy/master/index.html#len_zero - https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty
2021-04-09Lint: Use matches! macro.Nora Widdecke
- https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro
2021-04-09Lint: Remove unnecessary conversions.Nora Widdecke
- https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
2020-12-14openpgp: Drop the doc-hack in favor of doc(inline).Justus Winter
2020-12-11openpgp: Standardize fn main() in doctests.Azul
- Avoid the additional `fn f()`.
2020-12-10buffered-reader: Require Cookies to be Send and Sync.Azul
- This way the entire `BufferedReader<C>` will be `Send` and `Sync`. - Modify all other crates accordingly. - See #615.
2020-12-08openpgp: Add assert_send_and_sync! for more types.Azul
- All types that are `Send` and `Sync` are checked now. - Fixes #627.
2020-12-08openpgp: Use parens for assert_send_and_sync!.Azul
2020-12-08openpgp: Ensure public types are Send and Sync.Azul
- See #627.
2020-11-06openpgp: Use non_exhaustive attribute.Nora Widdecke
- Fixes #563 - With an MSRV >= 1.40.0, we can use #[non_exhaustive], as mentioned in #406. - This is also a clippy lint: https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive
2020-10-14Replace most 'extern crate' directives with 'use'.Justus Winter
- See #480.
2020-09-25openpgp, ipc: Make clippy ignore lalrpop output.Nora Widdecke
2020-08-12openpgp: Improve SKESK?::with_password.Justus Winter
- Previously, the symmetric algorithm argument conflated the algorithm to protect the payload and the one to protect the session key. Fix that by adding an argument to make the choice explicit.
2020-08-12openpgp: Fix typo.Justus Winter
2020-08-11openpgp: Check session key size.Justus Winter
- Fix session key size in test.
2020-08-11openpgp: Mark S2K::Simple and S2K::Salted as deprecated.Justus Winter
2020-08-06openpgp: Fix formatting of vector and array literals in examples.Justus Winter
- 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.
2020-06-10openpgp: Improve Display implementations.Justus Winter
2020-05-13openpgp: Make Encryptor::with_passwords polymorphic.Justus Winter
2020-05-05openpgp: Don't export internal data structures.Neal H. Walfield
- Don't export CertValidity, KeyringValidator, KeyringValidity, or MessageValidity. - Fixes #490.
2020-04-29openpgp: Reduce visibility of MessageValidator.Wiktor Kwapisiewicz
- Make MessageValidator `pub(crate)` instead of `pub`. - Move doctests into unit tests as doctests cannot access `pub(crate)` APIs. - Fixes #490.
2020-04-23openpgp: Add doctests and fixes for docs to Message struct.Wiktor Kwapisiewicz
- Add Examples to all public functions. - Add example armored message to the header. - Fix wording. - Fixes #468.
2020-04-21openpgp: Rename signature::Builder to signature::SignatureBuilder.Wiktor Kwapisiewicz
- Rename all calls to `Builder` with `SignatureBuilder`. - Fixes #481.
2020-04-08openpgp: Rename crypto::mpis to crypto::mpiIgor Matuszewski
To be consistent; we don't use plural forms for modules anywhere else and Rust always uses singular forms.
2020-04-03openpgp: Convert `Message::from_packets` to `TryFrom<Vec<Packet>>`Wiktor Kwapisiewicz
2020-04-03openpgp: Convert `Message::from_packet_pile` to `TryFrom<PacketPile>`Wiktor Kwapisiewicz
2020-04-02openpgp: Drop KeyID::from_hex in favor of FromStr.Justus Winter
- See #462.
2020-03-31openpgp: Improve summary line of modules and types.Justus Winter
- Avoid repeating the type name. - Avoid self referential, trivial descriptions. - Avoid the terms OpenPGP and Sequoia. - Fix mistakes from the Message -> PacketPile rework.
2020-03-31openpgp: Move definition of struct Message.Justus Winter
2020-03-26Remove redundant field names.Wiktor Kwapisiewicz
2020-03-26openpgp: Change packet bodies to be tristate.Justus Winter
- 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.
2020-03-13openpgp: Decouple PacketPile and Container.Justus Winter
- Likewise for the test.
2020-03-09Switch from failure to anyhow.Justus Winter
- 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.
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-03openpgp: Move crypto::s2k::S2K to crypto.Justus Winter
- The module contains only one exported item.
2019-12-20openpgp: Trim set of container functions and reduce visibility.Justus Winter
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: Move fields from Common to Container.Justus Winter
2019-12-19Don't use misleading `<&[T; N] as IntoIterator>::into_iter`Igor Matuszewski
See https://github.com/rust-lang/rust/pull/65819. Warned against by default since Rust 1.41. Right now `into_iter` returns references to objects inside an array rather than moving the values (as one would expect) so it makes sense to use `iter()` or for-in-borrowed (which calls the same thing) to retain the behaviour but make it less confusing.