summaryrefslogtreecommitdiffstats
path: root/ipc
AgeCommit message (Collapse)Author
2021-12-13ipc, openpgp: Bump quickcheck to 1.0.3.Nora Widdecke
- Adapt to the new API: - Gen is now a struct, not a Trait, and replaces StdThreadGen. - The rand re-export has been removed. As a consequence, we need our own function to generate an arbitrary value from a range.
2021-12-10ipc: Reduce tokio features.Nora Widdecke
2021-12-10ipc: Remove example that uses sequoia_store.Nora Widdecke
2021-12-06ipc: Release 0.27.0.ipc/v0.27.0Justus Winter
2021-12-01Update tokio to 1.13.1.Nora Widdecke
- tokio 1.12 has RUSTSEC-2021-0124.
2021-12-01ipc: Update to tokio 1.0.Nora Widdecke
- In assuan: - tokio::io::AsyncRead::poll_read now uses a ReadBuf buffer instead of a &mu [u8], so use that and write to the Client's buffer only if a read was successful. - Poll::Ready does not report n_read any more, so there cannot be a conflict between the reported and actual number of bytes read, remove that case. - Fixes #780.
2021-11-29ipc: Remove needless reference.Nora Widdecke
- Found with the help of the clippy::op_ref lint.
2021-11-29ipc: Apply clippy:single_char_pattern.Nora Widdecke
- Improves performance a tiny bit.
2021-11-29Fix Acronym spelling.Nora Widdecke
- In CamelCase, acronyms count as one word. Apply this rule where API and lalrpop are not impacted. - Found by clippy::upper_case_acronyms.
2021-11-29Remove unnecessary borrows.Nora Widdecke
- Fixed with the help of clippy::needless_borrow.
2021-10-18Relicense to LGPL 2.0 or later.Neal H. Walfield
- Change Sequoia's license from GPL 2.0 or later to LGPL 2.0 or later as unanimously decided on October 18, 2021 by: - Christof Wahl <cw@pep.security> (pEp security CEO) - Heiko Schaefer <heiko.schaefer@posteo.de> (pEp Foundation employee, Sequoia developer) - Justus Winter <justus@sequoia-pgp.org> (pEp Foundation employee, Sequoia Founder) - Neal H. Walfield <neal@pep.foundation> (pEp Foundation employee, Sequoia Founder) - Patrick Meier <pm@pep.security> (pEp security Chief Product and Service Officer) - Rudolf Bohli <rb@pep.security> (pEp security Chairman of the Board) - Volker Birk <vb@pep.security> (pEp security Founder, pEp Foundation Council)
2021-09-30Be explicit about giving Ok() the unit valueLars Wirzenius
Instead of giving Ok() the return value of a function that returns no value, i.e., the unit value (), give it explicitly. This is clearer and easier to follow for the reader. Found by clippy lint unit_arg: https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
2021-09-30Return a value without first assigning it to a variableLars Wirzenius
Found by clippy lint let_and_return: https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
2021-09-30Drop unnecessary to_string() methodsLars Wirzenius
The methods were shadowing the implementation of the same function via the Display trait. One implementation is enough. Found by the clippy trait inherent_to_string_shadow_display: https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string_shadow_display
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-09-30Avoid redundant closuresLars Wirzenius
If a closure just passes the argument it gets to a function, the closure is usually redundant and you can just use the function instead of the closure. Thus, instead of this: iter().map(|x| foo(x)) you can write this: iter().map(foo) This is shorter and simpler. Sometimes it doesn't work and the closure is necessary. Such locations can be marked with `#[allow(clippy::redundant_closure)]`. Found by clippy lint redundant_closure: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
2021-09-30Simplify how to create a vector of cloned valuesLars Wirzenius
Instead of this: something.iter().cloned().collect() do this: something.to_vec() It's shorter, simpler, and more to the point, and thus easier to understand. Found by clippy lint iter_cloned_collect: https://rust-lang.github.io/rust-clippy/master/index.html#iter_cloned_collect
2021-09-30Drop unnecessary main function from doc testLars Wirzenius
Test code embedded in document comments do not need to have a main function, the Rust test infrastructure provides one. Keeping the test code shorter is more idiomatic and shorter, both of which make it easier to understand. Found by clippy lint needless_doctest_main: https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
2021-09-30Simplify &foo == &bar into foo == barLars Wirzenius
This was found by clippy lint op_ref: https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
2021-09-30Drop unnecessary return statementsLars Wirzenius
Instead of "return foo" as the last statement executed in a function, just use "foo", which is more idiomatic style. This was found by the clippy lint needless_return: https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
2021-09-30Drop unnecessary lifetime notationsLars Wirzenius
Rust can automatically deduce lifetimes in some cases ("lifetime elision"). While adding unnecessary lifetime annotations is not incorrect, it can make it harder to follow the code: why is there a lifetime annotation here? What is the reason why it's needed? Is something unusual going on. This removes a few unnecessary lifetime annotations, as found by the clippy lint needless_lifetimes: https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
2021-09-21Avoid matching on &Foo, when a plain Foo pattern worksLars Wirzenius
The extra & in a pattern (match arm or if let) is unnecessary and only makes the code harder to read. In most places it's enough to just remove the & from the pattern, but in a few places a dereference (*) needs to be added where the value captured in the pattern is used, as removing the & changes the type of the captured value to be a reference. Overall, the changes are almost mechanical. Although the diff is huge, it should be easy to read. The clippy lint match_ref_pats warns about this. See: https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats
2021-09-15ipc: Avoid creating unused borrows.Justus Winter
2021-08-27Convert markdown to intra-doc links.Nora Widdecke
- Apply cargo intraconv.
2021-08-27ipc: Fix a crash in the sexp lexer.Justus Winter
- Fixes #742.
2021-08-26ipc: Release 0.26.0.ipc/v0.26.0Justus Winter
2021-08-26ipc: Update documentation.Justus Winter
2021-08-26ipc: Move the types from the core module to the top-level.Justus Winter
2021-08-26ipc: Remove unused error type.Justus Winter
2021-08-03fix: drop unnecessary and to-be-invalid #[doc] attributesLars Wirzenius
This fixes a build failure under Windows. It seems the two options will only work at the crate level in the future so the compiler warns about them now, and will fail build later. In CI, warnings seem to fail the build already. https://github.com/rust-lang/rust/issues/82730 https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#at-the-crate-level
2021-07-16ipc: Make assuan::Client Send and Sync.Justus Winter
2021-07-16ipc: Bring in our bag of macros.Justus Winter
2021-06-28ipc: Initial support for keybox files.Nora Widdecke
- Support for the GnuPG keybox format, based on keybox files created by GnuPG 2.2.23 and the way they are handled by the `kbxutil` program from that version of GnuPG. - Most structures that are not related to accessing the OpenPGP certs are not handled, like X.509 records and metadata sections. - Closes #252
2021-06-28ipc: Add keybox test data.Nora Widdecke
2021-06-14ipc: Invoke GnuPG in background without flashing terminals.Wiktor Kwapisiewicz
See relevant MR on sequoia-octopus-lib: https://gitlab.com/sequoia-pgp/sequoia-octopus-librnp/-/merge_requests/42
2021-04-16ipc: Don't abort if the curve parameter is unknown, fail.Neal H. Walfield
- This is d4876e3aa5bf1ce7d35431a632ec20ce23f2d1be in the octopus repository.
2021-04-13bench: Disable libtest benchmark harness.Nora Widdecke
- The libtest benchmark harness that is automatically added by cargo interferes with criterion. Disable it everywhere where there are no benchmarks. - https://github.com/rust-lang/rust/issues/47241 - https://bheisler.github.io/criterion.rs/book/faq.html
2021-04-12Include LICENSE.txt in all published cratesFabio Valentini
Having the license file in the root directory is not enough, since cargo actions for workspace members will not consider this file. This commit adds a symbolic link to the license file in the root directory of all workspace members, so "cargo publish" will include the LICENSE.txt file when publishing crates.
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
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-04-09Lint: Use lazy evaluation.Nora Widdecke
- https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call
2021-04-01ipc: Release 0.25.0.ipc/v0.25.0Neal H. Walfield
2021-03-31ipc: Do not disable default features on rand.Wiktor Kwapisiewicz
- This causes issues when dependencies are merged as rand 0.8 has more granular feature selection and at least `std` should be used there.
2021-03-31ipc: Incorporate sequoia-core crate as a core module.Wiktor Kwapisiewicz
- This moves all functionality from sequoia_core crate as an inner `core` module of the ipc crate. - The `core` module has to be public as other crates depend on `core::Context` either directly (store, ffi) or indirectly (store through ffi crate). - Remove the `core` crate completely.
2021-03-31ipc: Simplify error handling in examples.Wiktor Kwapisiewicz
- Rewrite any `expect`s and `unwrap`s into the `?` operator. - This loses the error detail. It could be recovered using `context` but for simplicity sake of the example the `?` operator suffices. - Additionally the `crate::` prefix has been removed as it is not necessary.
2021-03-24ipc: Fix armoring in the gpg-agent-sign example.Wiktor Kwapisiewicz
- Previously the armor::Writer was used but this caused the armoring not to be finalized and the output to appear truncated. - Migrate to Armorer to fix the resulting output.