summaryrefslogtreecommitdiffstats
path: root/openpgp/src/types
AgeCommit message (Collapse)Author
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-12-01openpgp: take ownership of Features bitfieldAzul
- Since `set_features` requires ownership of `Features`, it should take ownership rather than borrowing and cloning them. See https://rust-lang.github.io/api-guidelines/flexibility.html#caller-decides-where-to-copy-and-place-data-c-caller-control . - See #616.
2020-12-01openpgp: take ownership of KeyFlags bitfieldAzul
- Make `generate_key` polymorphic over `AsRef<KeyFlags>`. - Since `set_key_flags` requires ownership of the key flags, it should take ownership rather than borrowing and cloning the them. See https://rust-lang.github.io/api-guidelines/flexibility.html#caller-decides-where-to-copy-and-place-data-c-caller-control . - See #616.
2020-11-10openpgp: Use Padme as default padding policy.Wiktor Kwapisiewicz
2020-11-10openpgp: Make stream::Padder use the builder pattern.Wiktor Kwapisiewicz
- Split Padder::new() into new and build. - Adjust code in dependent projects (sop and sq). - Fixes #600.
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-14buffered-reader, openpgp: Port to bzip2 0.4.Justus Winter
2020-10-02openpgp: Rename Cert::merge_packets to Cert::insert_packets.Justus Winter
- This is closer to collection types such as HashMap, and distinguishes the function from Cert::merge that merges two certificates. - See #572.
2020-09-29openpgp: Implement PartialOrd, Ord for signature-related types.Justus Winter
- In order to deduplicate signatures, we need to be able to sort them. This change implements PartialOrd and Ord for all relevant types. Like PartialEq and Eq it is based on the serialized form, and can be derived for most of the types.
2020-09-25openpgp: Fix deprecation notices.Nora Widdecke
2020-09-22openpgp: Remove `quickcheck` feature.Wiktor Kwapisiewicz
- Adjust code to test for `cfg(test)` only, - Remove `quickcheck` and `rand` from dependencies so that they stay only in dev-dependencies, - Remove mention of `x-quickcheck` feature from the documentation, - Fixes #545.
2020-08-19openpgp: Rename SubpacketArea::lookup to SubpacketArea::subpacket.Neal H. Walfield
- Make `SubpacketArea::lookup`'s name more consistent with `SubpacketArea::subpackets`, `SubpacketAreas::subpacket`, and `SubpacketAreas::subpackets`.
2020-08-14openpgp: Fix Curve::arbitrary.Justus Winter
- Make sure not to generate unknown curves with OIDs exceeding 255 bytes as OpenPGP cannot represent those. - Fixes #542 and #543.
2020-08-13openpgp: Add note to enums that cannot be exhaustively matched.Justus Winter
2020-08-13openpgp: Adjust for SymmetricAlgorithm support diff. across backendsIgor Matuszewski
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-08-05openpgp: Implement NotationDataFlags using Bitfield.Justus Winter
- In contrast with the other bitfields, this one has a fixed size. Account for that in the API. Don't implement Default. - Fixes #525.
2020-08-05openpgp: Don't implement Default for the Bitflags types.Justus Winter
- See #525.
2020-08-05openpgp: Fix documentation.Justus Winter
2020-08-03openpgp: Change CertBuilder to use a relative expiration time.Neal H. Walfield
- `CertBuilder::set_expiration_time` takes an absolute time. - Most callers use a relative time. - Internally, we need a relative time (that's what the Key Expiration Time packet takes). - Converting the absolute time to a relative time is error prone: should it be relative to the creation time when called or when `CertBuilder` is finalized? - KISS: Change it to just take a relative time. - To better reflect the new semantics, also change the name to `CertBuilder::set_validity_period`.
2020-07-28openpgp: Reimplement the KeyFlags struct using Bitfield.Justus Winter
- This also drops the implementation of PartialOrd since we did not use it in the key selection after all. - Fixes #525.
2020-07-28openpgp: Reimplement the KeyServerPreferences struct using Bitfield.Justus Winter
- Also improve the documentation of the KSP::no_modify and the corresponding setters. - See #525.
2020-07-28openpgp: Rename Features::check to Features::get.Justus Winter
2020-07-28openpgp: Extract the Bitfield type from struct Features.Justus Winter
2020-07-28openpgp: Derive Eq, Hash for Features.Justus Winter
2020-07-22openpgp: Don't implement Default for Features.Neal H. Walfield
- The implementation of `Default` for `Features` returned an empty feature set. This is not a reasonable feature set: the MDC flag should almost always be set. - Remove the `Default` implementation and use `Features::empty` when an empty feature set is really required.
2020-07-22openpgp: Rework the Features implementation and interface.Neal H. Walfield
- Change Features to only store the raw value, a vector of bytes. Extract features on demand. - Add methods to query and manipulate unknown features. - Change `PartialEq` to implement serialized equality (like most other data structures). Add `normalized_eq` to implement semantic equality.
2020-07-01openpgp: Typo.Nora Widdecke
2020-06-08openpgp: Introduce feature flag for quickcheck.Nora Widdecke
- Make quickcheck dependency optional. - Make quickcheck a dev-dependency for tests. - Fix doctests for - cert::ValidCert::user_attributes, - cert::builder::CertBuilder::add_user_attribute, - cert::revoke::UserAttributeRevocationBuilder - cert::revoke::UserAttributeRevocationBuilder::build. Doctests do not use cfg(test), so we cannot use quickcheck in there.
2020-06-01openpgp: Add doctests to types module.Wiktor Kwapisiewicz
- Fixes #475.
2020-05-30openpgp: Derive Debug for RevocationType.Wiktor Kwapisiewicz
- Allow RevocationType to be used in unit tests.
2020-04-08openpgp: Implement From<&Cert> for RevocationKeyNeal H. Walfield
2020-04-03openpgp: Rename.Justus Winter
2020-04-02openpgp: Add limits to round_down and round_up.Nora Widdecke
2020-04-02openpgp: Rename PublicKeyAlgorithm::can_encrypt to for_encryption.Justus Winter
- Fixes #463.
2020-04-01openpgp: Implement Arbitrary for Signature.Justus Winter
2020-04-01openpgp: Fix RevocationKey::arbitrary.Justus Winter
2020-03-31openpgp: Implement Arbitrary for RevocationKey.Justus Winter
2020-03-31openpgp: Implement Arbitrary for the bit field types.Justus Winter
2020-03-31openpgp: Fix KeyServerPreferences::{PartialEq, Hash}.Justus Winter
- Also compare and hash unknown bits.
2020-03-31openpgp: Clarify PartialEq for bit field types.Justus Winter
2020-03-31openpgp: Fix KeyServerPreferences::no_modify.Justus Winter
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-27openpgp: Implement fmt::Display for Timestamp, improve fmt::Debug.Justus Winter
2020-03-26Remove redundant field names.Wiktor Kwapisiewicz
2020-03-18openpgp: Add a conversion from Timestamp to Option<SystemTime>.Neal H. Walfield
2020-03-16openpgp: Remove superfluous parenthesis.Justus Winter
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.