summaryrefslogtreecommitdiffstats
path: root/tool/src
AgeCommit message (Collapse)Author
2020-10-14sq: Rename module to 'sequoia-sq'.Justus Winter
2020-10-14Replace most 'extern crate' directives with 'use'.Justus Winter
- See #480.
2020-09-21openpgp: Fix typos.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-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-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-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-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
2020-04-09openpgp: Rename PacketParserBuilder::finalize to build.Justus Winter
- Writers should be finalized, builders should be built.
2020-04-08sq: Improve error handling.Justus Winter
2020-04-08openpgp: Replace PacketParser::decrypted with PP::encrypted.Justus Winter
- `decrypted` implies that the packet was previously encrypted. However, If we parse a signed-only message, the literal packet was never encrypted. Provide the inverse predicate instead, which is less misleading.
2020-04-08openpgp: Move methods mapping and inspect to VerificationHelper.Justus Winter
2020-04-08openpgp: Rename Field::data to as_bytes.Justus Winter
2020-04-08openpgp: Rename crypto::mpis to crypto::mpiIgor Matuszewski
To be consistent; we don't use plural forms for modules anywhere else and Rust always uses singular forms.
2020-04-06openpgp: Rename VerificationHelper::get_public_keys to get_certs.Justus Winter
2020-04-03openpgp: Unawkwardify the streaming encryptor.Justus Winter