Age | Commit message (Collapse) | Author |
|
- Adapt to the new API:
- Gen is now a struct, not a Trait, and replaces StdThreadGen.
- The rand re-export has been removed. As a consequence, we need
our own function to generate an arbitrary value from a range.
|
|
- If the round_up clampes the value to u32::MAX, the precision does
not apply.
- Closes #784.
|
|
- Fixes #769.
|
|
- Some link targets have moved or were replaced since the link's
creation. Make them point to the new location or replacement.
|
|
- openpgp: Make broken relative links absolute:
- find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+packet),\1crate::packet,' {} +
- find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+cert),\1crate::cert,' {} +
- find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+parse),\1crate::parse,' {} +
- find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+policy),\1crate::policy,' {} +
- find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+serialize),\1crate::serialize,' {} +
- find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+armor),\1crate::armor,' {} +
- find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+types),\1crate::types,' {} +
- find -name "*.rs" -exec sed -i -E 's,^( *//[/!] *(\[`PacketPile`\]):).*$,\1 crate::PacketPile,' {} +
- openpgp: Link to PacketParser and Policy structs, not the modules.
- ffi: Make links to sequoia_openpgp and sequoia_net absolute
- find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+sequoia_openpgp),\1sequoia_openpgp,' {} +
- find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+sequoia_net),\1sequoia_net,' {} +
|
|
- Apply cargo intraconv.
|
|
- https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
|
|
- https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
|
- The size of SystemTime is an implementation detail of the
standard library and does not give a direct indication whether
values larger that i32::MAX will fit in it.
- Adjust the test to observe if we are on a system can represent
a large value as a SystemTime or not, and assert that the values
are clamped correctly.
|
|
@nwalfield suggested this correction in #697
|
|
on Debian GNU/Linux systems, time_t is 4 octets for i386 (rust calls
this platform target_arch "x86"), armel ("arm"), armhf ("arm"), and
mipsel ("mips"). I've pulled these arch names from platforms [0].
[0] https://github.com/RustSec/platforms-crate/blob/main/src/target/arch.rs
There are likely other platforms that have a 32-bit time_t (and indeed,
some variants of 32-bit platforms like musl may have a 64-bit time_t [1]),
so this gating mechanism still isn't quite right. But it's an improvement
over the status quo of just gating on target_arch = "x86".
[1] https://musl.libc.org/time64.html
|
|
- SystemTime's underlying datatype may be only `i32`, e.g. on 32bit Unix.
As OpenPGP's timestamp datatype is `u32`, there are timestamps (`i32::MAX + 1`
to `u32::MAX`) which are not representable on such systems.
- To keep the API stable, instead of making the conversion fallible,
clamp those too large values to i32::MAX.
|
|
- January 1st is a holiday in much of the world.
- When we disable an algorithm, things will almost certainly break
somewhere.
- Reduce the chance that things break when people are on vacation by
using February 1st as the cutoff day instead of January 1st.
|
|
- Add `Duration::years`.
- This function assumes that there are 365.2425 days in a year,
which is the average number of days in a year in the Gregorian
calendar.
|
|
- Make `Duration::seconds` a const fn.
|
|
- Avoid the additional `fn f()`.
|
|
|
|
- See #627.
|
|
- 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.
|
|
- Make `SubpacketArea::lookup`'s name more consistent with
`SubpacketArea::subpackets`, `SubpacketAreas::subpacket`, and
`SubpacketAreas::subpackets`.
|
|
- See #525.
|
|
- `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`.
|
|
- This also drops the implementation of PartialOrd since we did not
use it in the key selection after all.
- Fixes #525.
|
|
- 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.
|
|
- Fixes #475.
|
|
|
|
|
|
|
|
- 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.
|
|
|
|
- Add a constant to represent the latest time representable by a
`Timestamp`.
|
|
|
|
|
|
- Fixes #427.
|
|
- 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).
|
|
- Fixes #414.
|
|
|
|
|
|
- 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.
|
|
- 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.
|