summaryrefslogtreecommitdiffstats
path: root/openpgp/src/serialize/stream.rs
AgeCommit message (Collapse)Author
2023-03-01openpgp: Add high-level encryption and signing roundtrip tests.Justus Winter
2023-02-16openpgp: Enable test.Justus Winter
- The OpenSSL backend supports OCB, so we should test it!
2022-12-21openpgp: Add tests for SKESK5::decrypt.Wiktor Kwapisiewicz
- Previously the AEAD-based SKESK5 code was not being exercised by the test suite due to a combination of being in a doctest and being guarded by #[cfg(test)]. - Add a separate test case that additionally utilizes `AEADAlgorithm::const_default`.
2022-12-12openpgp: Make hash_update_text more idomatic.Neal H. Walfield
- Make `hash_update_text` a method on `HashingMode<Digest>`, `HashingMode<Digest>::update`.
2022-05-12openpgp: Rename `iv_size` to `nonce_size` leaving `iv_size`.Wiktor Kwapisiewicz
- Rename `iv_size` to `nonce_size`. - Introduce `iv_size` that forwards to `nonce_size` for compatibility reasons. - Change all calls to `iv_size` to `nonce_size`.
2022-02-22openpgp: Fix emitting multiple signatures.Justus Winter
- Previously, stream::Signer did not properly bracket OPS/Sig packets when using more than one signer, i.e. OPS_a OPS_b Literal Sig_a Sig_b instead of OPS_a OPS_b Literal Sig_b Sig_a. - This is a regression introduced in 5bef3bde45f71126cdca3e8ad30b1047287c843a. - Fixes #816.
2022-02-15openpgp: Skip test if algorithm is not supported.Justus Winter
2022-02-14openpgp: Refactor AEAD encryption and decryption.Justus Winter
- Introduce a trait that schedules nonce and additional authenticated data for each AEAD chunk. - Factoring that out allows us to support different schemes, and decouple memory encryption from the OpenPGP schedules.
2022-01-10openpgp: Generalize test.Justus Winter
2021-12-31openpgp: Add ability to restrict hash algorithms for signing.Wiktor Kwapisiewicz
2021-11-29Remove unnecessary borrows.Nora Widdecke
- Fixed with the help of clippy::needless_borrow.
2021-11-18openpgp: Use a WASM-friendly SystemTime::now wrapper.Justus Winter
- Fixes #769.
2021-09-30Allow ::new to not return SelfLars Wirzenius
It is Rust custom that the new method for a type returns an instance of that type. However, sometimes that's not wanted. Tell clippy that these cases are OK. I opted to not do this globally, because that would prevent clippy from catching future cases. Found by clippy warning new_ret_no_self: https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self
2021-09-30Join nested if statements with logical and into one statementLars Wirzenius
Instead of this: if foo { if bar { ... } } do this: if foo && bar { ... } Nesting statements implies a more complicated code structure than it really is. Thus it's arguably simpler to write a combined condition by joining the two conditions with a logical and operation. Found by clippy lint collapsible_if: https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
2021-08-27ffi, openpgp: Cleanup links after cargo intraconv.Nora Widdecke
- openpgp: Make broken relative links absolute: - find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+packet),\1crate::packet,' {} + - find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+cert),\1crate::cert,' {} + - find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+parse),\1crate::parse,' {} + - find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+policy),\1crate::policy,' {} + - find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+serialize),\1crate::serialize,' {} + - find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+armor),\1crate::armor,' {} + - find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+types),\1crate::types,' {} + - find -name "*.rs" -exec sed -i -E 's,^( *//[/!] *(\[`PacketPile`\]):).*$,\1 crate::PacketPile,' {} + - openpgp: Link to PacketParser and Policy structs, not the modules. - ffi: Make links to sequoia_openpgp and sequoia_net absolute - find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+sequoia_openpgp),\1sequoia_openpgp,' {} + - find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+sequoia_net),\1sequoia_net,' {} +
2021-08-27Convert markdown to intra-doc links.Nora Widdecke
- Apply cargo intraconv.
2021-04-28openpgp: Implement Encryptor::with_session_key.Justus Winter
- Fixes #390.
2021-04-28openpgp: Fix documentation.Justus Winter
2021-04-28openpgp: Simplify code.Justus Winter
2021-04-20lint: Remove unnecessary trailing semicolons.Nora Widdecke
- rustc 1.51 has activated the redundant_semicolons lint. https://doc.rust-lang.org/rustc/lints/listing/warn-by-default.html#redundant-semicolons
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: Use matches! macro.Nora Widdecke
- https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro
2021-04-09Lint: Remove unnecessary conversions.Nora Widdecke
- https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
2021-03-05openpgp: Do not recommend padding by default.Justus Winter
- We discovered compatibility problems with the padding mechanism, so we should caution against its use when compatibility with certain implementations is required. Also, don't use padding in the module's example.
2021-02-24openpgp: Improve example.Justus Winter
2021-02-24openpgp: Fix links.Justus Winter
2021-02-24openpgp: Verify messages using the Cleartext Signature Framework.Justus Winter
- Implement verification of messages using the Cleartext Signature Framework by detecting them in the armor reader, and transforming them on the fly to inline signed messages. - The transformation is not perfect. We need to synthesize one-pass-signatures, but we only know the hash algorithm(s) used. Luckily, this is the only information the packet parser needs. - We only enable the transformation when using stream::Verifier. The transformation is transparent to the caller. Currently, there is no way to disable this. In the next major revision, we may add ways to control this behavior. - Fixes #151.
2021-02-24openpgp: Sign messages using the Cleartext Signature Framework.Justus Winter
- See #151.
2021-02-10openpgp: Generalize streaming Signer modes.Justus Winter
2020-12-11openpgp: Standardize fn main() in doctests.Azul
- Avoid the additional `fn f()`.
2020-12-08openpgp: Use parens for assert_send_and_sync!.Azul
2020-12-08openpgp: Add assert_send_and_sync! for more types.Azul
- With !928 merged more types are `Send` and `Sync` now. - See #627.
2020-12-08openpgp: Allow generic types in assert_send_and_sync!.Azul
- Use generics and the anonmymous lifetime in `assert_send_and_sync!`. - See 627.
2020-12-08openpgp: Ensure public types are Send and Sync.Azul
- See #627.
2020-12-07openpgp: Drop hash::Context in favor of a pub trait hash::Digest.Justus Winter
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-10-21openpgp: Don't mention method that is no longer public.Justus Winter
2020-10-21openpgp: Fix references.Justus Winter
2020-10-14Use 'Examples' for the examples section.Justus Winter
- See #480.
2020-10-09openpgp: Make Recipient::set_keyid easier to use.Justus Winter
2020-10-02openpgp: Make signature verification use a mutable self reference.Justus Winter
- This will allow us to mark subpackets as authenticated by the verification operation.
2020-09-22openpgp: Replace certificate with one that does not expire.Justus Winter
- The tests used a certificate that expired by now. However, because Sequoia did not consider subkeys of expired certificates to be also expired, the tests were happy.
2020-09-22openpgp: Hide stream::Encryptor::aead_algo from public API.Wiktor Kwapisiewicz
- Mark `aead_algo` as available only during tests, - Remove support for AEAD from `sop`, - Mark `aead` parameter in FFI as unused, - openpgp-ffi: Drop `aead_algo` argument from `pgp_encryptor_new`, - Fixes #550.
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-12openpgp: Improve SKESK?::with_password.Justus Winter
- Previously, the symmetric algorithm argument conflated the algorithm to protect the payload and the one to protect the session key. Fix that by adding an argument to make the choice explicit.