summaryrefslogtreecommitdiffstats
path: root/openpgp/examples
AgeCommit message (Collapse)Author
2022-09-29openpgp, sq: Update dependency rpassword to 6.Nora Widdecke
- rpassword underwent some rework. The successor of read_password_from_tty seems to be prompt_password, relevant commits to rpassword: - e6023757df00a67a1e16796db50c5ffad41b6268 - 2edf6cee07573ec4aa86531e6177ee90331d5c60
2022-09-06openpgp: Fix typos spotted by codespell.Wiktor Kwapisiewicz
2022-04-12openpgp: Collect ECDH parameters in statistics example.Justus Winter
- Fixes #838.
2021-11-29Remove unnecessary borrows.Nora Widdecke
- Fixed with the help of clippy::needless_borrow.
2021-09-28openpgp: Add example that prints the supported algorithms.Justus Winter
- Also run this example in the CI so that we can see what algorithms are supported by which backend.
2021-06-28openpgp: Fix example.Justus Winter
2021-04-28openpgp: Implement Encryptor::with_session_key.Justus Winter
- Fixes #390.
2021-04-28openpgp: Improve example.Justus Winter
2021-04-12openpgp: Add example that creates a group key.Justus Winter
2021-04-09Lint: Remove unecessary imports.Nora Widdecke
- https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports
2021-04-09Lint: Use next instead of nth(0).Nora Widdecke
- https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero
2021-04-09Lint: Use is_empty().Nora Widdecke
- https://rust-lang.github.io/rust-clippy/master/index.html#len_zero - https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty
2021-04-09Lint: Remove redundant lifetime.Nora Widdecke
- Constants have by default a `'static` lifetime - https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
2020-12-07openpgp: Make serialize::stream::Message Send + Sync.Justus Winter
- See #615.
2020-11-10openpgp: Use Padme as default padding policy.Wiktor Kwapisiewicz
2020-11-10openpgp: Make stream::Padder use the builder pattern.Wiktor Kwapisiewicz
- Split Padder::new() into new and build. - Adjust code in dependent projects (sop and sq). - Fixes #600.
2020-10-22openpgp: Improve documentation on how to encrypt for multiple certs.Justus Winter
2020-10-22openpgp: Select only supported encryption-capable keys.Justus Winter
2020-09-21openpgp: Convert `extern crate` to `use` in examples.Wiktor Kwapisiewicz
2020-09-21openpgp: Call all layers of the message `message`.Wiktor Kwapisiewicz
2020-09-21openpgp: Fix examples to use stream::Armorer.Wiktor Kwapisiewicz
2020-09-21openpgp: Adjust examples to use try operator.Wiktor Kwapisiewicz
- Change `expect` to `context(...)?`, - Change `unwrap` to `?`.
2020-08-05openpgp: Don't implement Default for the Bitflags types.Justus Winter
- See #525.
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-15openpgp: Collect statistics about public key algorithms.Justus 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: Convert from ValidKeyAmalgamation for Recipient.Justus Winter
- Simplify examples accordingly.
2020-05-13openpgp: Avoid constructing vectors of recipients.Justus Winter
- Every iterator implements IntoIterator. Simplify accordingly.
2020-05-13openpgp: Make Encryptor::for_recipients polymorphic.Justus Winter
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-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-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-06openpgp: Rename VerificationHelper::get_public_keys to get_certs.Justus Winter
2020-04-03openpgp: Unawkwardify the streaming encryptor.Justus Winter
2020-04-02openpgp: Move the padding module to serialize::stream.Justus Winter
2020-03-26Remove redundant field names.Wiktor Kwapisiewicz
2020-03-16openpgp: Fix examples.Justus Winter
- Properly finalize the armor writer.
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-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-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: 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-19openpgp: Split VerificationResult.Justus Winter
- Split VerificationResult into Result<GoodChecksum, VerificationError>. - Fixes #416.
2020-02-18openpgp: Improve tracking of secret keys.Justus Winter
- We use marker traits to track with the type system if a Key has secret key material attached. Previously, it was possible to subvert that by taking the secret key material using Key4::set_secret, creating a Key4<SecretParts, ..> without any secrets. - Related, the accessor functions returned an Option<SecretKeyMaterial> even for Key4<SecretParts, ..>. - Replace set_secret by add_secret and take_secret that also change the Key's type accordingly. Make the accessors infallible if we know we have a secret key, rename Key4<P, R>::secret to Key4<P, R>::optional_secret to make the distinction clear. - Fixes #435.
2020-02-17openpgp: Reduce the number of explicit key conversions.Justus Winter
2020-02-12openpgp: Add optional cipher argument to DecryptionHelper::decrypt.Justus Winter