summaryrefslogtreecommitdiffstats
path: root/sqv
AgeCommit message (Collapse)Author
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-06sqv: Improve test.Justus Winter
- Make dates more plausible, add userid to make certificates more compatible.
2020-06-30openpgp: A direct key signature can be made by a third party.Neal H. Walfield
- To support third-party direct key signatures (e.g., revocations), change `SignatureBuilder::sign_direct_key` to take the key that is being signed, and not assume that it is `signer::public`.
2020-06-29openpgp: Don't unnecessarily set signature subpackets.Neal H. Walfield
- When using the `SignatureBuilder`, the signature creation time and issuer subpackets will be correctly set by default. - Don't do it explicitly.
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-12Release 0.17.0.v0.17.0Justus Winter
2020-05-07openpgp: Use a builder to construct DetachedVerifier.Justus Winter
- See #498.
2020-04-28openpgp: Simplify Cert::try_from conversions from packets.Wiktor Kwapisiewicz
- Convert Cert::try_from(PacketPile::from(packets)) into Cert::try_from(packets). - Fixes #496.
2020-04-28openpgp: Convert `Cert::from_packet_pile` into `TryFrom`Wiktor Kwapisiewicz
- Drop `Cert::from_packet_pile`. - Fixes #462.
2020-04-21openpgp: Rename signature::Builder to signature::SignatureBuilder.Wiktor Kwapisiewicz
- Rename all calls to `Builder` with `SignatureBuilder`. - Fixes #481.
2020-04-16sqv: Improve error reporting when reading keyrings.Justus Winter
2020-04-06openpgp: Rename VerificationHelper::get_public_keys to get_certs.Justus Winter
2020-04-06openpgp: Introduce (mandatory, for now) crypto-nettle feature flagIgor Matuszewski
2020-04-03Release 0.16.0.v0.16.0Justus Winter
2020-03-27sqv: Improve error reporting.Justus Winter
2020-03-25openpgp: Improve performance of detached signature verification.Justus Winter
- Previously, we transformed data and detached signatures into signed messages on the fly, then used the streaming Verifier to verify the message. However, this introduces a nontrivial overhead, even if unnecessary copies are carefully avoided. - Instead, specialize the streaming Decryptor to handle detached signatures. use crypto::hash_buffered_reader to compute the hashes over the data, then attach the computed signatures to the signature packets, and use Decryptor's verification machinery. - While this is arguably less elegant, it is much simpler, and a lot faster. Notably, if we operate on files and can mmap them into memory, we can compute the hash in one call to the compression function. Verification of detached signatures is an important use case, so this speedup outweighs the loss of elegance. - Fixes #457.
2020-03-20openpgp: Remove `to_hex` in KeyHandle, KeyID and Fingerprint.Wiktor Kwapisiewicz
- Replace all usages of `to_hex` with formatting string with :X specifier. - Fixes #456.
2020-03-09Switch from failure to anyhow.Justus Winter
- 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.
2020-03-09Reduce use of explicit failure::Fallible.Justus Winter
2020-03-06sq,sqv: Further relax dependency on colored.Daniel Kahn Gillmor
- In caa8e0df, we relaxed the dependency on colored as a way to more flexibly constrain the MSRV. But colored was a transitive dependency in the first place, and we wouldn't have required any specific version of it if it wasn't present. We can let the intermediate dependencies be responsible for the preferred minimum version, rather than explicitly declaring it ourselves. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2020-03-04Release 0.15.0.v0.15.0Justus Winter
2020-02-26openpgp: Add a prelude file to import things related to certificatesNeal H. Walfield
- Add `openpgp/src/cert/prelude.rs` to import most types and traits related to certificates. - Use it instead of using the types and traits individually.
2020-02-20openpgp: Split the ValidAmalgamation trait.Neal H. Walfield
- Split the ValidAmalgamation trait into two traits, Amalgamation and ValidAmalgamation, so that the functionality made available by the Amalgamation trait can be provided by a ComponentAmalgamation, which doesn't have a policy.
2020-02-20sq, sqv: Relax dependency on colored.Daniel Kahn Gillmor
- In eaaaf33dc15df65a7d34b9f436080e49f30f9715, colored was fixed to 1.9.1 "to keep our MSRV stable" presumably because 1.9.2 bumped the version of rustc required. However, older versions of colored still work to build. This was tested on debian, which today has 1.6.1. It's possible that even earlier versions of colored work as well, but this is all I've tested. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2020-02-19openpgp: Split VerificationResult.Justus Winter
- Split VerificationResult into Result<GoodChecksum, VerificationError>. - Fixes #416.
2020-02-07Release 0.14.0.v0.14.0Justus Winter
2020-02-07Pin dependencies to keep our MSRV stable.Justus Winter
2020-02-06sqv: Rename flag --trace to --verbose.Justus Winter
- All the trace messages are gone except for the summary.
2020-02-06sqv: Print fingerprints and keyids without whitespace.Justus Winter
- This improves usability, e.g. when copy&pasting. - Fixes #422.
2020-01-31openpgp: Add a policy object.Neal H. Walfield
- 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).
2020-01-18sqv: Drop data more idiomatically.Neal H. Walfield
2020-01-18sqv: Rewrite to use the streaming verifier.Neal H. Walfield
- sqv implements the same functionality as streaming verifier. Use that instead of reimplementing it.
2020-01-17tool: Add an option to specify the signing time.Neal H. Walfield
- Add the option `--time` to the `sign` and `encrypt` subcommands to allow the user to set the signature's creation time. - Use the value of this option to select the signing keys.
2020-01-17sqv: Relax test.Justus Winter
- Don't match on "predates" in stderr. If the signing key is selected using the signature's creation time, the key selection will fail, possibly producing a different error message.
2020-01-16openpgp: Return Result<()> from Signature::verify*.Justus Winter
2020-01-13openpgp: Change KeyHandle's PartialOrd and PartialEq implementations.Neal H. Walfield
- The current PartialOrd and PartialEq implementations for KeyHandles considers KeyIDs and Fingerprints to not be equal. Since most users of this interface expect key identifiers to be interchangeable, this means that they have to pull KeyHandles apart when comparing them, like this: match (a, b) { (KeyHandle::Fingerprint(a), KeyHandle::Fingerprint(b)) => a == b, (KeyHandle::Fingerprint(a), KeyHandle::KeyID(b)) => a.keyid() == b, ... } This is unergonomic, and easy to forget to do. - The obvious fix would be to change the PartialOrd and PartialEq implementations to do this for the user. Unfortunately, this is not possible, because they must be transitive and two fingerprints (a and b) maybe different but have the same keyid. That is, the following is possible: a == keyid, b == keyid, but a != b That makes this comparison function non-transitive and inappropriate for the PartialOrd and PartialEq traits. - Nevertheless, we can implement PartialOrd and PartialEq and return None when a keyid and a fingerprint match. (A consequence of this is that KeyHandle can no longer implement Eq or Ord.) This prevents users of this interface from naively comparing KeyHandles. - Using this interface, we provide the desired, non-transitive, comparison function via a method (KeyHandle::aliases). - This change means that a `KeyHandle` can no longer be used as a Key in a HashMap. In these cases, we instead use a vector. - Fixes #412.
2020-01-08openpgp: Include a reference time in KeyAmalgamation.Neal H. Walfield
- Including the reference time in the KeyAmalgamation structure rather than having the user supply it to the individual methods (like `KeyAmalgamation::alive`) helps ensure that the key is used consistent. For instance, this makes it harder to mistakenly query key's liveness at time t, but then use the current time to determine the key's capabilities.
2020-01-06openpgp: Pass a timestamp to the KeyIter instead of each filter.Neal H. Walfield
- KeyIter::revoked and KeyIter::key_flags (and its variants) didn't take a time stamp so they could only be used for filtering keys based on their current state, not their state at some time in the past. Adding a time stamp to each of the filters would have fixed the problem, but it would have made the interface ugly: callers always want the same time stamp for all filters. - Split KeyIter into two structures: a KeyIter and a ValidKeyIter. - Add KeyIter::policy. It takes a time stamp, which is then used for filters like `alive` and `revoked`, and it returns a ValidKeyIter, which exposes filters that require a time stamp.
2020-01-03openpgp: Rename hash_file to hash_reader, improve documentation.Justus Winter
2020-01-03openpgp: Simplify crypto::hash_file.Justus Winter
- The context knows the algorithm now.
2019-12-20Release 0.13.0.v0.13.0Justus Winter
2019-12-20openpgp: Simplify key iteration interface.Neal H. Walfield
- Cert::keys_valid() is just a short-cut for Cert::keys_all().alive().revoked(false). - Remove Cert::keys_valid() and rename Cert::keys_all() to Cert::keys().
2019-12-19openpgp: Change KeyIter to return a struct instead of a tuple.Neal H. Walfield
- A tuple is just an unnamed, inflexible struct. Use a struct instead. - Fixes #400.
2019-12-17openpgp: Make Subpacket own the data.Justus Winter
- The subpacket areas now have a vector of subpackets. Change some accessors here and there to accommodate this. - This requires bit-perfect roundtripping of subpackets so that signatures are not invalidated. - First step towards fixing #200.
2019-12-16sqv: Clarify that we expect ISO 8601 timestamps.Daniel Kahn Gillmor
- ISO 9801 is "Opthalmic instruments -- Trial case lenses", not "Representation of dates and times" - The commit log of 4b7457928f2d57bdb881a70c762db7d4359d541f references ISO 6801, which is "Rubber or plastics hoses — Determination of volumetric expansion", which is also supposed to be 8601.
2019-12-16sqv: Support more variants of ISO 6801 timestamps.Justus Winter
- Fixes #403.
2019-12-16openpgp: Fix terminology.Justus Winter
- What the code called a "primary key binding" is actually a direct key signature. Primary key bindings are signatures by signing-capable subkeys over primary and subkey. - See #402.
2019-12-13sqv: Improve tests.Justus Winter
- Test all kinds of revocations, test signature that predates the primary key. Same with a subkey.
2019-12-13sqv: Check that subkeys are live at the sig's creation time.Justus Winter
- Fixes #44.