summaryrefslogtreecommitdiffstats
path: root/tool
AgeCommit message (Collapse)Author
2020-10-12Allow to opt out of default features for sequoia-* dependenciesIgor Matuszewski
Cargo features are inherently additive, which means that if: - package A walts to build package C with features ABC, - package B walts to build package C with features BCD, the package C will be built with *both* ABC and BCD enabled. There is currently no way to specify mutually exclusive features and these have to be implemented using existing, additive, ones. That's problematic for us, because currently the cryptographic backend in sequoia-openpgp is selected globally at build-time and thus at most one can be selected for the compilation to succeed. It's worth noting that we can't use Cargo build scripts to emit the `--cfg`-passing [directive] because it does *not* affect Cargo's dependency resolution and that's needed in order to skip unbuildable backends on certain OSes (e.g. nettle when using Windows MSVC ABI). To allow for other local crates, most notably sequoia-openpgp-ffi, to build with different backends, we expose and forward any features that may be used by the crates they transitively depend on. At the time of writing, these different features seem to be implemented: - buffered-reader: compression support - openpgp: compression support and cryptographic backend - store: background-services feature [directive](https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-cfgkeyvalue)
2020-09-21openpgp: Fix typos.Nora Widdecke
2020-09-21tool: Update itertools to 0.9.Nora Widdecke
2020-09-21tool, sqv: Unpin transitive dependency colored.Nora Widdecke
2020-09-21tool: Always specify clap 2.32.0.Nora Widdecke
2020-09-21sq, openpgp: Update rpassword to 5.0.Nora Widdecke
2020-09-17sq: Use buffered_reader::File::open instead of fs::File::open.Justus Winter
- The former remembers the file's path and includes it in error messages.
2020-09-02tool: Improve description.Neal H. Walfield
- An unknown packet is unknown either because we don't understand the packet's type or we understand the type, but we don't support the particular version, e.g., v3 keys. - Improve 'sq packet dump''s description accordingly.
2020-08-21Release 0.19.0.v0.19.0Justus Winter
2020-08-20openpgp: Add optional parameters to unknown S2K variants.Justus Winter
- This mirrors how we handle other unknown variants. However, since we do not know the length of the parameters for unknown S2K variants, we cannot parse them back. To work around that, the parameter field is optional, and will be `None` when an unknown S2K is parsed. The data is not lost, but stored in the packet containing the S2K object, so that we can serialize it again. - Carefully preserve the invariant that we can parse any packet we can serialize by comparing the serialized form of the packet fragments containing the S2K and any fields the parameters of unknown variants bleed into on parsing. - Unfortunately, this means that S2K on its own no longer roundtrips. Remove that test accordingly.
2020-08-20openpgp: Make SKESK?::esk and SKESK5::aead_iv fallible.Justus Winter
2020-08-20openpgp: Make key::Encrypted::ciphertext fallible.Justus Winter
2020-08-17openpgp: Move crypto::Keygrip to the ipc crate.Justus Winter
2020-08-17openpgp: Rename PublicKey::keygrip to Keygrip::of.Justus Winter
- This allows us to move Keygrip to a different crate.
2020-08-12openpgp: Change accessors to return all issuers.Neal H. Walfield
- Unlike the `Signature Creation Time` subpacket, there are legitimate reasons to have multiple `Issuer` subpackets and `Issuer Fingerprint` subpackets. - Rename `SubpacketAreas::issuer` to `SubpacketAreas::issuers` and return all `Issuer` subpackets. - Likewise, Rename `SubpacketAreas::issuer_fingerprint` to `SubpacketAreas::issuer_fingerprints` and return all `Issuer Fingerprint` subpackets. - Change `sq` to list all issuers. Deduplicate first, however.
2020-08-11openpgp: Mark S2K as non-exhaustive to allow future extensions.Justus Winter
2020-08-11openpgp: Mark S2K::Simple and S2K::Salted as deprecated.Justus Winter
2020-08-06sq: Make dumping corrupted OpenPGP data more robust.Justus Winter
- Previously, sq packet dump would often fail without dumping any packets, even if a prefix of the data could be successfully parsed. - To fix this, we need to do two things. First, we need to clone the packet while it is in the parser *before* we advance the parser, which could potentially fail. Second, we need to flush the output once the parser fails. - Fixes #524.
2020-08-05openpgp: Don't implement Default for the Bitflags types.Justus Winter
- See #525.
2020-08-04sq: Remove superfluous use.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-31Release 0.18.0.v0.18.0Justus Winter
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-24openpgp: Improve PacketParserResult::as_ref, as_mut, and map.Justus Winter
- Previously, these method withheld information in the EOF case (and in case of `map` this loss is irrecoverable). Fix this by returning a Result instead.
2020-07-15sq: Dump header length if available.Justus Winter
2020-07-06sq: Improve rendering of revocations.Justus Winter
2020-07-06sq: Typo.Justus Winter
2020-06-23ipc, sq: Copy the MSRV comment from openpgp.Jakub Kądziołka
2020-06-18Improve install target.Justus Winter
- Add explicit build-release and install targets. - Explicitly build the crates. - Move installation to the crate's Makefile. - This allows building of Sequoia's individual parts, e.g. by using 'make -Copenpgp-ffi install'.
2020-06-16tool: Fix whitespace.Neal H. Walfield
2020-06-16tool: Have 'sq inspect' show whether the secret key is encryptedNeal H. Walfield
- Change `sq inspect` to also show whether any secret key material is encrypted or not.
2020-06-16tool: Make 'sq packet dump' always summarize the secret key materialNeal H. Walfield
- `sq packet dump` only shows information about the secret key material (whether it is encrypted, and how it is encrypted) when `--mpis` is specified. - `--mpis` should only control whether the mpis are printed, not the summary information. - Change `sq packet dump` always print the summary information.
2020-06-12Release 0.17.0.v0.17.0Justus Winter
2020-05-28openpgp: Change the `decrypt` proxy in the decryption helper.Justus Winter
- Returning rich errors from this function may compromise secret key material due to Bleichenbacher-style attacks. Change the API to prevent this. - Hat tip to Hanno Böck. - Fixes #507.
2020-05-28openpgp: Change PKESK::decrypt to return an Option<_>.Justus Winter
- Returning rich errors from this function may compromise secret key material due to Bleichenbacher-style attacks. Change the API to prevent this. - Hat tip to Hanno Böck. - See #507.
2020-05-13openpgp: Unawkwardify Encryptor::add_password.Justus Winter
2020-05-07openpgp: Configure mapping in the builder, remove from Helper trait.Justus Winter
- See #498.
2020-05-07openpgp: Use a builder to construct Decryptor.Justus Winter
- See #498.
2020-05-07openpgp: Use a builder to construct Verifier.Justus Winter
- See #498.
2020-05-07openpgp: Use a builder to construct DetachedVerifier.Justus Winter
- See #498.
2020-05-06openpgp: Streamline iteration over MessageStructure.Justus Winter
- Implement IntoIter and Deref to &'a [MessageLayer<'a>], drop the custom iteration structs.
2020-04-28openpgp: Convert `Cert::from_packet_pile` into `TryFrom`Wiktor Kwapisiewicz
- Drop `Cert::from_packet_pile`. - Fixes #462.
2020-04-28openpgp: Rename Cert::revoked, etc. to revocation_statusNeal H. Walfield
- Rename `Cert::revoked`, `ValidCert::revoked`, `ValidAmalgamation::revoked`, and `ComponentBundle::revoked` to revocation_status to more accurately match what it does. - Don't rename `ValidComponentAmalgamationIter::revoked` or `ValidKeyAmalgamationIter::revoked`. They don't return the revocation status; they check whether the key is revoked.
2020-04-21sq: Use the new armoring filter.Justus Winter
2020-04-21sq: Rework recipient handling.Justus Winter
2020-04-20openpgp: Add armor::Writer::with_headers.Justus Winter
- Add a new constructor that takes headers. This allows us to make the header argument polymorphic.
2020-04-16Revert "openpgp: Make PacketParserResult a std::result::Result."Justus Winter
This reverts commit 2e1eec5fe4157a391a13554ff7df3075cfe043cc.
2020-04-15openpgp: Drop Cert::primary_userid.Justus Winter
- Fixes #484.
2020-04-09openpgp: Make PacketParserResult a std::result::Result.Justus Winter
- This avoids the partial implementation imitating std::option::Option, replacing it with std::result::Result. - As a benefit, std::result::Result is in the prelude, simplifying a lot of parsing loops.
2020-04-09openpgp: Remove convenience functions.Justus Winter