summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2021-04-07Lint: Do not .clone a Copy type.nora/lintNora Widdecke
- https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
2021-04-07Lint: Remove unecessary imports.Nora Widdecke
- https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports
2021-04-07Lint: Use next instead of nth(0).Nora Widdecke
- https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero
2021-04-07Lint: Use is_empty().Nora Widdecke
- https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
2021-04-07Lint: Remove redundant lifetime.Nora Widdecke
- Constants have by default a `'static` lifetime - https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
2021-04-07Lint: Remove redundant returns.Nora Widdecke
- https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
2021-04-07Lint: Use matches! macro.Nora Widdecke
- https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro
2021-04-07Lint: Remove useless as_ref.Nora Widdecke
- https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref
2021-04-07Lint: Remove redundant closures.Nora Widdecke
- https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
2021-04-07Lint: Use byte literals.Nora Widdecke
- https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8
2021-04-07Setup clippy.Nora Widdecke
2021-04-07Lint: Remove unnecessary conversions.Nora Widdecke
- https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
2021-04-07Remove unnecessary trailing semicolons.Nora Widdecke
2021-04-07Lint: Use lazy evaluation.Nora Widdecke
- https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call
2021-04-07openpgp: Remove unnecessary allocation.Nora Widdecke
2021-04-06Remove version consistency check.Justus Winter
- This check no longer makes sense as the crate versions are no longer in sync. - Fixes #703.
2021-04-06doc: Use unordered list.Justus Winter
2021-04-06openpgp: Fix link.Justus Winter
2021-04-06openpgp: Fix SystemTime test.Nora Widdecke
- 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.
2021-04-06openpgp: Correct system_time_32_bit test.Daniel Kahn Gillmor
@nwalfield suggested this correction in #697
2021-04-06openpgp: Enable time_t overflow test on other 32-bit platforms.Daniel Kahn Gillmor
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
2021-04-01ipc: Release 0.25.0.ipc/v0.25.0Neal H. Walfield
2021-04-01Run cargo update.Neal H. Walfield
2021-04-01Fix documentation links.Neal H. Walfield
2021-03-31ipc: Do not disable default features on rand.Wiktor Kwapisiewicz
- This causes issues when dependencies are merged as rand 0.8 has more granular feature selection and at least `std` should be used there.
2021-03-31net: Protect against redirection loops in WKD requests.Wiktor Kwapisiewicz
- Use explicit depth to indicate how many redirects have been executed and break the loop if the number is bigger than 10. - Using `reqwest` was considered but rejected due to Tokio version incompatibility (`reqwest` insists on using Tokio 1 while Sequoia uses 0.2 in many places).
2021-03-31net: Follow redirects when using WKD lookup.Wiktor Kwapisiewicz
- See: https://lists.gnupg.org/pipermail/gnupg-devel/2018-May/033736.html - This solves lookups on domains that do redirects such as kernel.org - Fixes #666.
2021-03-31ipc: Incorporate sequoia-core crate as a core module.Wiktor Kwapisiewicz
- This moves all functionality from sequoia_core crate as an inner `core` module of the ipc crate. - The `core` module has to be public as other crates depend on `core::Context` either directly (store, ffi) or indirectly (store through ffi crate). - Remove the `core` crate completely.
2021-03-31ipc: Simplify error handling in examples.Wiktor Kwapisiewicz
- Rewrite any `expect`s and `unwrap`s into the `?` operator. - This loses the error detail. It could be recovered using `context` but for simplicity sake of the example the `?` operator suffices. - Additionally the `crate::` prefix has been removed as it is not necessary.
2021-03-30Minor edits in documentation.Heiko
2021-03-30Fix terminology: certificate vs. certification.Heiko
2021-03-29Clarify/fix wording in documentation.Heiko
2021-03-25openpgp: Only record fields if we consume the data.Justus Winter
- Fixes #698.
2021-03-24ipc: Fix armoring in the gpg-agent-sign example.Wiktor Kwapisiewicz
- Previously the armor::Writer was used but this caused the armoring not to be finalized and the output to appear truncated. - Migrate to Armorer to fix the resulting output.
2021-03-23openpgp: Short-circuit regex alternations with empty branches.Neal H. Walfield
- The regex 'a|b|' is an alternation of three branches: 'a', 'b', and ''. The last branch matches anything, so the alternation matches anything, and therefore the whole thing can be elided. - This is required for regex <= 1.3.7, which doesn't support empty alternations. - Unfortunately, this is the version in Debian Bullseye. - Fixes #694.
2021-03-22openpgp: Add test demonstrating that canonicalization is robust.Justus Winter
- At some point, invalid self-signatures would be mis-classified as third-party certifications by Cert::canonicalize. As a side-effect, invalid self-revocations would be considered third-party revocations, changing the certificates revocation status to CouldBe. Confusingly, also changing the digest prefix would break this mis-classification, resulting in a revocation status of NotAsFarAsWeKnow. - The underlying issue was fixed in 7afee60b7cf0f19559bfccd8c42fdc77f6b9c655. - Add a test that demonstrates that bad signatures are now recognized as such, and that the confusing behavior previously observed is now consistent. - Fixes #486.
2021-03-19sq: Dump trust packets using the hex dumper.Justus Winter
2021-03-19openpgp: Simplify key serialization code.Justus Winter
2021-03-19openpgp: Align equality, serialization of Key packets.Justus Winter
- Previously, serializing Packet::PublicKey(k) would not serialize any secret key material on k, but when comparing Packet::PublicKey(k) with Packet::PublicKey(l), the secret key material would be significant. This is in conflict with our definition of equality, which states that two objects are considered equal if their canonical serialized form is equal. - Closely related, secret key material was considered significant when comparing Key<_, _> objects, and secret key material was emitted when they were serialized, even for objects of type Key<PublicParts, _>. - Align equality, serialization of Key<_, _> objects by ignoring any secret key material when comparing and serializing objects of type Key<PublicParts, _>. - Fixes #632 and #633.
2021-03-18openpgp: fix a few typos in docsEli Flanagan
2021-03-18openpgp: Use time-constant comparison for MDC.Wiktor Kwapisiewicz
- This avoids side-channel attacks on the MDC computed digest.
2021-03-17openpgp: Fix handling of malformed MDC packets.Justus Winter
- Tampering with MDC packets can be used to create decryption oracles. To defend against that, we need to respond with uniform error messages. - Thanks to Lara Bruseghini for bringing this to our attention. - Fixes #693.
2021-03-17openpgp: Improve tests related to encrypted keys.Justus Winter
- Add a test exercising key encryption. - Demonstrate that key packets are correctly replacing existing packets when using Cert::insert_packets.
2021-03-17openpgp: Rename keys to certs to avoid confusion.Justus Winter
2021-03-17openpgp: Ignore marker packets when verifying detached sigs.Justus Winter
- Fixes #686.
2021-03-17openpgp: Test that marker packets are ignored when parsing Certs.Justus Winter
- See #686.
2021-03-17openpgp: Test that marker packets are ignored when verifying.Justus Winter
- See #686.
2021-03-17openpgp: Add 1pa3pc test vector from dkgpg.Justus Winter
- See #335 and https://savannah.nongnu.org/bugs/index.php?60154
2021-03-12sq: Improve keyring list.Justus Winter
- Try hard to list the most relevant (i.e. primary) user id. - Add a flag --all-userids to list all userids.
2021-03-11sq: Implement keyring filter --userid.Justus Winter
- Fixes #689.