Age | Commit message (Collapse) | Author |
|
- Now that we use OnceCell for the cache, we can hand out references
to the cached data. This closes the gap between UserID and
ConventionallyParsedUserID, hence I think this addresses the
concern in #377.
- Deprecate the allocating variants.
- Fixes #377.
|
|
- Fixes #104.
|
|
|
|
- Fixes #992.
|
|
|
|
- This seems over-engineered in retrospect.
|
|
- Fixes https://gitlab.com/sequoia-pgp/sequoia/-/issues/1038
|
|
|
|
zbase32 is distributed under LGPL-3+ which is incompatible with some projects.
Use the MIT licensed implementation z-base-32 instead.
Signed-off-by: Dylan Aïssi <dylan.aissi@collabora.com>
|
|
- Upgrade base64 to version 0.21.
|
|
|
|
|
|
|
|
- This way, only the leaf package has to concern itself with the
selection of a cryptographic backend for Sequoia. Notably, we
don't have to repeat all of sequoia-openpgp's features in all
crates that use sequoia-openpgp.
- Enable the new feature resolver which allows for this method.
- A complication arises because we want to make `cargo test` work by
default for the intermediate crates without developers having to
select a cryptographic backend. To make that work, we implicitly
select a backend in the dev dependencies which are enabled when
compiling the tests. To make it even more convenient, we select
the most convenient backend, which is CNG for Windows and Nettle,
our default, for every other platform.
- Now that we have implicitly selected CNG on Windows for running
the tests, when the user wants to use Nettle on Windows, and does
`cargo test --features sequoia-openpgp/crypto-nettle`, then two
backends are selected: the implicitly selected CNG and the
explicitly selected Nettle. In this case, we detect that an
implicit selection has been made, and ignore the implicitly
selected backend. Now, this has already been compiled by
cargo (remember that we cannot influence the set of dependencies
at the time the build script is run), but we can still ignore the
implicit backend using conditional compilation (i.e. it will not
be included in the resulting binary). The same happens on
non-Windows platforms where Nettle is the implicit default for
tests when the user explicitly requests a different backend. In
both cases, Nettle and CNG are slim wrappers around native
libraries, so the wasted compilation time is low.
|
|
|
|
- Use Cargo.toml's rust-version field instead of a rust-toolchain
file. It is more flexible and does not prevent use of newer
compilers.
|
|
Less code to maintain this way.
Sponsored-by: pep.foundation
|
|
More idiomatic this way.
Sponsored-by: pep.foundation
|
|
- Add dane::get.
- Make EmailAddress functions pub(crate) to use them from the DANE
module.
- Add tests for generating correct FQDN.
- See #865.
|
|
- Previously, the doctests for the macros were not run, and hence
not tested. Fix the few issues that came up when Rust 1.62
started running doctests.
- We cannot test the macros in doctests, because the macros are
not public. Add equivalent unit tests instead.
- Changes copied from 9d4be0b243b6a0d61c7fa1b33d6b1f978f1b6601.
- Fixes #916.
|
|
|
|
In WKD, when a URL is generated for an email, the local part is added
to the URL as a query parameter exactly as it's in the input. Sequoia
was previously converting it to lower case. This fixes it to avoid the
change.
However, the local part still needs to be converted to lower case for
hash computation, so we do that when we compute the hash.
Fixes #874
Sponsored-by: pep.foundation
|
|
|
|
|
|
This allows futures with a Keyserver in scope to be Send, allowing them
to be used with multithreaded async libraries such as tokio.
|
|
|
|
- Fixes #824.
|
|
- Detected by the rustdoc::bare-urls lint.
|
|
- Previous refactoring inadvertently broke capability URL
construction.
- Fix the bug by moving `append_pair` after `join`.
- Add test cases to capability URL construction code.
|
|
|
|
|
|
|
|
This change aligns Private Key Store support to the newest version and
changes how the hash algorithm is passed. Previously it was in the query
parameters and the routine to add that parameter was prone to abuse on
malformed input. Passing the correct algorithm in the `Content-Type`
header is cleaner and simpler for both clients and servers.
|
|
|
|
|
|
- tokio 1.12 has RUSTSEC-2021-0124.
|
|
- Continuation of e6a335b93a10620bcb7cbfa32e232949758f0c99.
|
|
- Fixed with the help of clippy::needless_borrow.
|
|
- Add sequoia_net::pks::unlock_signer.
- Add sequoia_net::pks::unlock_decryptor.
|
|
|
|
- net: hyper has two vulnerabilities:
- RUSTSEC-2021-0079: "Integer overflow in `hyper`'s parsing of the
`Transfer-Encoding` header leads to data loss" (vulnerability)
- RUSTSEC-2021-0078: "Lenient `hyper` header parsing of
`Content-Length` could allow request smuggling" (vulnerability)
Both are fixed in hyper 0.14.10., which depends on tokio 1. tokio
0.2 is incompatible to tokio 1, so we need to update that too, also
in the dependents sq and ffi.
hyper-tls 0.4 is incompatible to hyper 0.14., update to hyper-tls
0.5.
|
|
- 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)
|
|
|
|
An if condition is an expression and can be as complex as the
programmer wants. However, the more complex a condition is, the harder
it tends to be to understand. I marked functions with such if
conditions so that clippy won't complain about the code. I probably
should have simplified the code, perhaps by extracting the condition
to its own function, but it would have been much harder to do, so I
didn't.
Found by clippy lint blocks_in_if_conditions:
https://rust-lang.github.io/rust-clippy/master/index.html#blocks_in_if_conditions
|
|
It is customary for Rust data container structures to have both
is_empty and len, methods, because is_empty can both more to the point
and also faster to implement.
Sometimes is_empty makes no sense, as it doesn't for
openpgp::types::Curve, which isn't a container structure. Arguably it
would be better to rename Curve::len to something like Curve::bits,
but as that would change the API, I've opted to tell clippy that not
having is_empty in this case is OK.
Found by clippy lint len_without_is_empty:
https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty
|
|
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
|
|
In a match arm, instead of binding the matched value to the name "_",
just don't bind. Its shorter and easier to understand
Found by clippy lint redundant_patter:
https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern
|
|
When creating a struct with a field foo, using a variable also named
foo, it's not necessary to name the field explicitly. Thus, instead
of:
Self { foo: foo }
use this:
Self { foo }
The shorter form is more idiomatic and thus less confusing to
experienced Rust programmers.
This was found by the clippy lint redundant_field_names:
https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
Sponsored-by: author
|
|
This was found by the clippy clone_on_copy lint:
https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
|
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
|