summaryrefslogtreecommitdiffstats
path: root/openpgp/src/types/timestamp.rs
AgeCommit message (Collapse)Author
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-05openpgp: Don't implement Default for the Bitflags types.Justus Winter
- See #525.
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-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-04-02openpgp: Add limits to round_down and round_up.Nora Widdecke
2020-03-27openpgp: Implement fmt::Display for Timestamp, improve fmt::Debug.Justus Winter
2020-03-18openpgp: Add a conversion from Timestamp to Option<SystemTime>.Neal H. Walfield
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-02-11openpgp: New function to normalize SystemTime.Justus Winter
2020-02-10openpgp: Add Timestamp::MAX.Neal H. Walfield
- Add a constant to represent the latest time representable by a `Timestamp`.
2020-02-09openpgp: Provide some convenient constants.Neal H. Walfield
2020-02-06openpgp: Fix name of setter.Justus Winter
2020-02-06openpgp: Rename methods 'set_policy' to 'with_policy'.Justus Winter
- Fixes #427.
2020-01-31openpgp: Add a policy object.Neal H. Walfield
- Change all functions that need to evaluate the validity of a signature (either directly or indirectly to take a policy object. - Use the policy object to allow the user to place additional constraints on a signature's validity. - This addresses the first half of #274 (it introduces the policy object, but does not yet implement any policy).
2020-01-20openpgp: Use the new framework for Cert::userid.Justus Winter
- Fixes #414.
2020-01-15openpgp: Add application example for Timestamp::round_down.Justus Winter
2020-01-15openpgp: Implement addition and subtraction of durations.Justus Winter
2020-01-08openpgp: Add convenience functions for masking timestamps.Justus Winter
- Timestamps can be used to identify people attending a common event, like a key signing party. By reducing the resolution of the time stamps, we can alleviate this problem. - Fixes #216.
2019-12-03openpgp: Add two new types, Timestamp and Duration.Justus Winter
- Timestamp and Duration represent dates and durations with the range and resolution that OpenPGP can represent. By using these types to store dates and durations, we enforce correct canonicalization.