summaryrefslogtreecommitdiffstats
path: root/openpgp/src/message
AgeCommit message (Collapse)Author
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.
2019-12-03openpgp: Drop algorithm argument from signature::Builder::sign_hash.Justus Winter
- The hash context knows the algorithm.
2019-11-25openpgp: Rename openpgp::constants to openpgp::types.Justus Winter
- Fixes #381.
2019-10-27Fix more spelling errors caught by codespellDaniel Kahn Gillmor
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-09-27linting: Clear up bare trait object warningsDaniel Silverstone
Newer Rust compilers requre `dyn` marking trait objects. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-09-18openpgp: Make Parse::from_bytes polymorphic over AsRef<[u8]>.Justus Winter
- 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.
2019-09-17openpgp: Make packet::Common::children private.Justus Winter
2019-09-17openpgp: Make packet::Common::body private.Justus Winter
2019-09-03openpgp: Assert that central types are Send and Sync.Justus Winter
- Add compile-time assertions that public types like Packet, TPK, Message... can be send across thread boundaries, and can be safely accessed from multiple threads. - Fixes #334.
2019-08-26openpgp: Implement FromStr for some types.Justus Winter
- This implements std::str::FromStr for types that have string-representations and are reasonably likely to be encountered by downstream users, e.g. fingerprints or messages. This allows us to do `"xxx".parse()?`. - Fixes #320.
2019-08-23openpgp: Use marker types to denote a Key's type.Neal H. Walfield
- In addition to providing some added protection, this allows us to implement 'From<Key<_, _>> for Packet'.
2019-07-15Prepare for Rust 2018.Justus Winter
- 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.
2019-07-02openpgp: Simplify SessionKey::new.Justus Winter
2019-06-01openpgp: Simplify tests.Justus Winter
2019-05-24Update to lalrpop 0.17Neal H. Walfield
- Closes #281
2019-05-11openpgp: Include the path in the MessageValidator errorNeal H. Walfield
- To ease debugging, include the path of the packet that caused the parse error.
2019-04-05openpgp: When validating messages, fail on unknown packets.Justus Winter
- Don't merely look at the tag, but make sure that we understood the packet.
2019-04-05openpgp: Make a Message's packet pile derefable.Justus Winter
2019-04-01openpgp: Support the marker packet.Justus Winter
- Fixes #234.
2019-03-26openpgp: Add enum Key.Justus Winter
- Fixes #228.
2019-03-26openpgp: Add enum PKESK.Justus Winter
- See #228.
2019-03-26openpgp: Add enum SEIP.Justus Winter
- See #228.
2019-03-26openpgp: Add enum OnePassSig.Justus Winter
- See #228.
2019-03-26openpgp: Introduce explicit packet versions, move enum SKESK.Justus Winter
- This patch makes packet::skesk public, exports the SKESK4 and SKESK5 type there, and moves the SKESK enum to packet. - This is a clean and faithful way to represent packet versions. It allows us to cleanly support future versions, and offer partial support for older versions. Parsing and understanding old versions allows Sequoia to be used to access archived information. - This is the first of a series of patches that introduces explicit packet versions for all packet types in the form of enums like the SKESK enum. - See #228.
2019-02-17openpgp: Implement From<Vec<Packets>> for PacketPile.Justus Winter
- This replaces PacketPile::from_packets.
2019-02-15openpgp: split Key::generate into generate_rsa and generate_eccKai Michaelis
ECC and RSA key need different parameters. It makes sense to have two functions.
2019-02-06openpgp: New public constructor PKESK::new.Justus Winter
- See #173.
2019-02-06openpgp: Express MDC::for_hash with From.Justus Winter
2019-02-06openpgp: Rename Key::new to Key::generate.Justus Winter
2019-02-06openpgp: Rename consuming conversion functions.Justus Winter
- 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.
2019-01-02openpgp: Move KeyPair to crypto.Justus Winter
2018-12-28openpgp: Make KeyPair own Key and mpis::SecretKey.Justus Winter
2018-12-19openpgp: Make signature::Builder::sign_hash use Signer.Justus Winter
2018-12-14openpgp: Introduce trait Parse.Justus Winter
- Trait Parse introduces a uniform interface to parse packets, messages, keys, and related data structures.
2018-12-13openpgp: Make fields of SEIP private.Justus Winter
2018-12-13openpgp: Make fields of PKESK private.Justus Winter
2018-12-12openpgp: Move SecretKey to packet::key.Justus Winter