summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2021-03-25openpgp: Check size of SystemTime.merge-requests/1049Nora Widdecke
- Gating the 32-bit SystemTime test on the target platform may be incorrect. Instead, check the size of SystemTime.
2021-03-23openpgp: Correct system_time_32_bit test.Daniel Kahn Gillmor
@nwalfield suggested this correction in #697
2021-03-23openpgp: 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-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.
2021-03-11sq: Clarify matching semantics.Justus Winter
- Fixes #690.
2021-03-11sq: Fix filtering certificates.Justus Winter
- Fixes 1eee13d7035718eddc1163d7e0432299aee15ffe.
2021-03-10ci: prefer --workspace flagEli Flanagan
Close #660 The changelog documenting cargo's --workspace arrival is [here](https://github.com/rust-lang/cargo/blob/61a31bc5ff290322d5c025bf750c56501999235d/CHANGELOG.md#added-13). Note `cargo fmt` still expects `--all` because the subcommand semantics differ.
2021-03-09ci: Disable windows jobs for forks.Nora Widdecke
2021-03-08autocrypt: Release 0.23.1.autocrypt/v0.23.1Justus Winter
- Fixes #688.
2021-03-05sq: Release 0.25.0.sq/v0.25.0Justus Winter
2021-03-05openpgp: Release 1.1.0.openpgp/v1.1.0Justus Winter
2021-03-05openpgp: Do not recommend padding by default.Justus Winter
- We discovered compatibility problems with the padding mechanism, so we should caution against its use when compatibility with certain implementations is required. Also, don't use padding in the module's example.
2021-03-05openpgp: Fix panic when verifying signatures.Wiktor Kwapisiewicz
- Signatures with no layers generated panic at runtime as zeroth index was not available. - Make `Decryptor::from_buffered_reader` return Err when no layers are available. - Fixes #682.
2021-03-05openpgp: Use fallible time operations.Nora Widdecke
- SystemTime +/- Duration may over-/underflow.
2021-03-05openpgp: Fix SystemTime from Timestamp on 32bit.Nora Widdecke
- 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.
2021-03-04Use oxalica overlay in NixOS instructions.Nora Widdecke
2021-03-03Add NixOS instructions to readme.Nora Widdecke
- Closes #685
2021-03-03ffi: Fix memory leak.Nora Widdecke
- When dropping the Context, free the error pointer, too. - Add test that would have allowed valgrind to find the issue. - Fixes #671
2021-03-02sq: Improve reporting of verification errors.Justus Winter
- We now explain the errors like sequoia-sop: % sq verify --detached msg.sig --signer-cert ... < msg Error verifying checksum from 39D100AB67D5BD8C04010205FB3751F1587DAEF1: Policy rejected non-revocation signature (Binary) requiring collision resistance because: MD5 is not considered secure since 1997-02-01T00:00:00Z 1 bad checksum. Error: Verification failed - Fixes #676.
2021-03-02Revert "sq: Make it build with sequoia-openpgp 1.0.0."Justus Winter
This reverts commit 6e555106da58e943a7f2a3091c89c282232fc968.
2021-03-02buffered-reader: Release 1.0.1.buffered-reader/v1.0.1Justus Winter
2021-03-02sq: Be smarter about emitting the unstable CLI warning.Justus Winter
- Only emit the warning if we detect non-interactive use and are emitting data that could be scraped resulting in fragile constructs. - Fixes #653.
2021-03-02sq: Refactor opening of output streams.Justus Winter
- Make the create_or_stdout* functions available as methods on the Config struct. Adapt callsites. - Also, differentiate between data that is safe to redirect to a file or pipe to the next program (e.g. OpenPGP data, decrypted or authenticated payloads) and data that could possibly be scraped (e.g. packet dumps).
2021-03-02ffi_macros: Fix import of ToTokens.Nora Widdecke
- The `syn` crate really does not want users to refer to their private re-exports (https://github.com/dtolnay/syn/commit/957840e, in 1.0.58). - Pull in `ToTokens` from its original source, `quote`. - Fixes building with `syn >= 1.0.58`.
2021-03-02sq: Hexdump non human-readable notation values.Justus Winter
2021-03-02openpgp: Implement fmt::Display for NotationData.Justus Winter
- Fixes #667.
2021-03-02openpgp: Implement nicer fmt::Debug for NotationData.Justus Winter
- See #667.
2021-03-02openpgp: Fix documentation.Justus Winter
2021-03-02openpgp: Drop spaces from default string representation.Justus Winter
- Spaces in key ids and fingerprints make them awkward to copy and pass as command line arguments. Change the default representation. For the rare occasions that we expect users to manually verify fingerprints, the previously introduced *::to_hex_pretty functions can be used. - Fixes #422.
2021-03-02openpgp: Fix documentation.Justus Winter
2021-03-02openpgp: Add methods for hexadecimal representation with spaces.Justus Winter
- These are explicitly intended for manual comparison of key ids and fingerprints. - See #422.
2021-03-02openpgp, autocrypt, guide: Make tests more robust.Justus Winter
- Use a more stable formatting when comparing fingerprints.
2021-02-24sq: Improve --signatures defaults, document error handling.Justus Winter
- Require at least one valid signature for `sq verify`. For `sq decrypt`, require one if at least one signer cert is given. - Document what happens if signature verification fails, or message tampering is detected using the SEIP packet. - Fixes #677.
2021-02-24sq: Improve hint to use "--force".Justus Winter
- Fixes #273.
2021-02-24sq: Improve output.Justus Winter
- Add 'Note:' and fix alignment.