summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2020-07-31Release 0.18.0.v0.18.0Justus Winter
2020-07-31openpgp: Make it easier to add an Intended Recipient.Neal H. Walfield
- `SignatureBuilder::set_intended_recipients` sets multiple Intended Recipient subpackets at once. However, if we want to build the intended recipients gradually, it is not appropriate: it first clears any existing Intended Recipient subpackets. - Add `SignatureBuilder::add_intended_recipient` to add an Intended Recipient subpacket without first clearing any existing Intended Recipient subpackets.
2020-07-31openpgp: Add variants to SignatureBuilder to add issuer subpackets.Neal H. Walfield
- `SignatureBuilder::set_issuer` and `SignatureBuilder::set_issuer_fingerprint` first clear the unhashed area of any existing Issuer or Issuer Fingerprint subpackets, respectively. - Add a variant to add an additional Issuer or Issuer Fingerprint subpacket.
2020-07-31openpgp: Improve the introduction of module crypto.Justus Winter
- See #474.
2020-07-31openpgp: Improve documentation of crypto::mpi.Justus Winter
- See #474.
2020-07-31openpgp: Improve comparing secret key material.Justus Winter
- Do not explicitly shortcut the iteration by using fold instead of find.
2020-07-31openpgp: Use ProtectedMPI::cmp instead of secure_mpi_cmp.Justus Winter
2020-07-31crypto: Implement (Partial)Ord, (Partial)Eq for ProtectedMPI.Justus Winter
2020-07-31openpgp: Rename MPI::new_weierstrass to MPI::new_point.Justus Winter
2020-07-31openpgp: Add and use MPI::new_compressed_point.Justus Winter
2020-07-31openpgp: Fix documentation.Justus Winter
- encrypt_shared is also used by the ECDH over NIST curves.
2020-07-31openpgp: Improve documentation of crypto::mem.Justus Winter
- See #474.
2020-07-31openpgp: Improve documentation of crypto::Password.Justus Winter
- See #474.
2020-07-31openpgp: Improve documentation of crypto::SessionKey.Justus Winter
- See #474.
2020-07-31openpgp: Improve documentation of crypto::hash.Justus Winter
- See #474.
2020-07-31openpgp: Fix the type of OPS packets.Justus Winter
- Use the type from the template instead of hardcoding it to binary.
2020-07-31Update README.md.Justus Winter
2020-07-31openpgp: Remove SignatureBuilder::set_signature_expiration_time.Neal H. Walfield
- `SignatureBuilder::set_signature_expiration_time` takes an absolute time and converts it to a duration relative to the `Signature Creation Time` subpacket. - Since we sometimes set the `Signature Creation Time` subpacket lazily, this should probably also be set lazily. - But that makes the `SignatureBuilder` more complicated. And, it means that `SignatureBuilder::modify_hashed_area`'s behavior is more complicated. - Instead of adding complexity, only provide the `SignatureBuilder::set_signature_validity_period` method, which is what is appears to be needed in practice.
2020-07-31openpgp: Improve SignatureBuilder's API.Neal H. Walfield
- Most of the setters do not take an `Option` where `None` means remove the subpacket. There is no particular reason that set_signature_validity_period or set_signature_expiration_time should either. So, don't. - Don't take a bare `time::Duration` or `time::SystemTime`, but anything that implements `Into<time::Duration>` or `Into<time::SystemTime>`.
2020-07-29openpgp: Move some ECDH helper functions to backend-agnostic moduleIgor Matuszewski
2020-07-29openpgp: Allow modifying subpacket areas using a builder-style API.Neal H. Walfield
- For the most part, `SignatureBuilder` provides a builder-style API. - Adding custom subpackets requires working with a mutable reference to a subpacket area, which is jarring: let mut builder = SignatureBuilder::new(SignatureType::Binary) // Build up the signature. ; builder.unhashed_area_mut().add(Subpacket::new( SubpacketValue::Unknown { tag: SubpacketTag::Private(61), body: [ 0x6D, 0x6F, 0x6F ].to_vec(), }, true)?)?; let sig = builder.sign_message(&mut signer, msg)?; - Provide a function to allow the user to work with subpacket areas using a builder-style interface.
2020-07-29openpgp: Derive PartialOrd and Ord for SubpacketTag.Neal H. Walfield
- It's useful to get a deduplicated list of all subpacket tags in a subpacket area. For this, we need `Ord`.
2020-07-29openpgp: Add a conversion from Signature to Signature4.Neal H. Walfield
- Implement `TryFrom<Signature>` for `Signature4`.
2020-07-29openpgp: Make Cert::from_packets fail on additional input.Justus Winter
- Previously, Cert::TryFrom<PacketParserResult> expected the packet sequence to contain exactly one certificate. If it finds anything else, it fails. On the other hand, Cert::from_packet (and therefore also Cert::TryFrom<Vec<Packet>> and TryFrom<PacketPile>) expected the packet sequence to start with a certificate. If it contains additional certificates or invalid packets, those were silently ignored. - Harmonize the behavior by changing Cert::from_packet (and therefore also Cert::TryFrom<Vec<Packet>> and TryFrom<PacketPile>) to behave like Cert::TryFrom<PacketParserResult> and fail if the certificate is followed by any more packets. - Fixes #504.
2020-07-28openpgp: Explicitly handle plaintexts being too large.Justus Winter
- Fixes undefined behavior (a likely crash) in pkcs5_pad.
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-28openpgp: Reimplement the KeyServerPreferences struct using Bitfield.Justus Winter
- Also improve the documentation of the KSP::no_modify and the corresponding setters. - See #525.
2020-07-28openpgp: Rename Features::check to Features::get.Justus Winter
2020-07-28openpgp: Extract the Bitfield type from struct Features.Justus Winter
2020-07-28openpgp: Derive Eq, Hash for Features.Justus Winter
2020-07-27openpgp: Document parse::Dearmor.Justus Winter
- Fixes #471.
2020-07-27openpgp: Avoid monomorphization of generic_serialize_into.Justus Winter
2020-07-24openpgp: Improve documentation of PacketParserResult.Justus Winter
- See #471.
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-24openpgp: Don't mention private type in documentation.Justus Winter
- See #471.
2020-07-24openpgp: Add links to the documentation.Justus Winter
- See #471.
2020-07-24openpgp: Clarify what happens when verifying detached signatures.Justus Winter
- See #471.
2020-07-24openpgp: Improve documentation of enum MessageLayer.Justus Winter
- See #471.
2020-07-24openpgp: Fix hiding imports in doctests.Wiktor Kwapisiewicz
2020-07-22openpgp: Don't implement Default for Features.Neal H. Walfield
- The implementation of `Default` for `Features` returned an empty feature set. This is not a reasonable feature set: the MDC flag should almost always be set. - Remove the `Default` implementation and use `Features::empty` when an empty feature set is really required.
2020-07-22openpgp: Rework the Features implementation and interface.Neal H. Walfield
- Change Features to only store the raw value, a vector of bytes. Extract features on demand. - Add methods to query and manipulate unknown features. - Change `PartialEq` to implement serialized equality (like most other data structures). Add `normalized_eq` to implement semantic equality.
2020-07-21openpgp: Remove PacketParserResult::is_none.Justus Winter
- There is no variant called `None`, so having this predicate seems wrong. - See #489.
2020-07-16doc: Improve pre-release checks.Justus Winter
2020-07-15openpgp: Collect statistics about public key algorithms.Justus Winter
2020-07-15sq: Dump header length if available.Justus Winter
2020-07-15openpgp: Gracefully handle malformed notation names.Justus Winter
2020-07-15openpgp: Implement MarshalInto for Header.Justus Winter
2020-07-15openpgp: Fix serialization of UserAttribute subpackets.Justus Winter
2020-07-15openpgp: Fix implementation of Arbitrary for UA subpackets.Justus Winter
2020-07-15openpgp: Improve documentation.Neal H. Walfield