summaryrefslogtreecommitdiffstats
path: root/autocrypt
AgeCommit message (Collapse)Author
2020-10-14Release 0.20.0.v0.20.0Justus Winter
2020-10-14openpgp, autocrypt: Port to base64 0.13.Justus Winter
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-10-07autocrypt, openpgp: Unpin base64.Nora Widdecke
2020-09-21autocrypt: Extract test data to files.Nora Widdecke
2020-08-21Release 0.19.0.v0.19.0Justus Winter
2020-08-05openpgp: Don't implement Default for the Bitflags types.Justus Winter
- See #525.
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-06-12Release 0.17.0.v0.17.0Justus Winter
2020-06-12Relax dependency on base64.Justus Winter
2020-05-18autocrypt: only export transport encrypt and sign subkeys on encode-senderRuben Pollan
Authentication subkeys are not needed for autocrypt, let's reduce the size of the export. - Fixes #506
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-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-20openpgp: Don't finalize the PartialBodyFilter in Drop.Justus Winter
- Previously, PartialBodyFilter::drop made an effort to finalize the filter. This, however, is only a best-effort mechanism: It cannot report errors. - Because of this, we now believe that it actually exacerbates the problem of downstream users not finalizing the filter: It will work most of the time, but sometimes fail. - Drop the implementation of Drop. Fix all the problematic test cases.
2020-04-16Revert "openpgp: Make PacketParserResult a std::result::Result."Justus Winter
This reverts commit 2e1eec5fe4157a391a13554ff7df3075cfe043cc.
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-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: 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-03Release 0.16.0.v0.16.0Justus Winter
2020-04-03openpgp: Unawkwardify the streaming encryptor.Justus Winter
2020-04-02openpgp: Drop Fingerprint::from_hex in favor of FromStr.Justus Winter
- See #462.
2020-03-27autocrypt: Add ability to parse Autocrypt-Gossip headers.Wiktor Kwapisiewicz
- Refactor parsing of Autocrypt headers into own function. - Key gossip uses the same format as specified in the spec [0]. - Add tests from attached ticket. - Fixes #394. [0]: https://autocrypt.org/level1.html#key-gossip
2020-03-26Remove redundant field names.Wiktor Kwapisiewicz
2020-03-04Release 0.15.0.v0.15.0Justus Winter
2020-03-03openpgp: Only impl Serialize for objects that are normally exported.Neal H. Walfield
- Add two new traits: `Marshal` and `MarshalInto`. - Implement them instead of `Serialize` and `SerializeInto`. - Only implement `Serialize` and `SerializeInto` for data structures that are normally exported. - This should prevent users from accidentally serializing a bare signature (`Signature`) when they meant to serialize a signature packet (`Packet`), for instance. - Fixes #368.
2020-03-01autocrypt: When creating an Autocrypt header, use valid data.Neal H. Walfield
- When creating an Autocrypt header, make sure the components are valid according to the policy and not revoked, and include the current valid binding signature, not the newest one, whose creation time may be in the future.
2020-02-26openpgp: Don't unnecessarily use ComponentAmalgamation::bundle.Neal H. Walfield
- A `ComponentAmalgamation` derefs to a `ComponentBundle`. Don't use `ComponentAmalgamation::bundle` if it is unnecessary and doesn't improve legibility.
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: Add the bundle method to the Amalgamation trait.Neal H. Walfield
- Add the `bundle()` method to the Amalgamation trait instead of implementing it on each struct.
2020-02-20openpgp: Rename the Amalgamation trait to ValidAmalgamation.Neal H. Walfield
- The Amalgamation trait only applies to ValidComponents. Rename it accordingly.
2020-02-17openpgp: Reduce the number of explicit key conversions.Justus Winter
2020-02-14openpgp: Add an option to change the cipher suite used for subkeys.Neal H. Walfield
- Add a parameter to CipherSuite::add_subkey, which, if not None, overrides the default cipher suite for that subkey. - This makes it easier to create a key with, say, an ECC primary and an RSA subkey.
2020-02-07Release 0.14.0.v0.14.0Justus Winter
2020-02-07Bump base64 to 0.11.Justus Winter
2020-02-06autocrypt: New crate.Justus Winter
- Move the autocrypt-related functionality to a new crate. - Fixes #424.