summaryrefslogtreecommitdiffstats
path: root/net
AgeCommit message (Collapse)Author
2022-01-12net: Fix link.Neal H. Walfield
- Detected by the rustdoc::bare-urls lint.
2022-01-10pks: Fix "capability" parameter not being appended.Wiktor Kwapisiewicz
- Previous refactoring inadvertently broke capability URL construction. - Fix the bug by moving `append_pair` after `join`. - Add test cases to capability URL construction code.
2021-12-31pks: Use appropriate Error objects instead of raw strings.Wiktor Kwapisiewicz
2021-12-31pks: Return correct acceptable hashes for the remote signer.Wiktor Kwapisiewicz
2021-12-29pks: Add support for SHA-384 hash algorithm.Wiktor Kwapisiewicz
2021-12-13net: Use Content-Type header to pass hash algorithmWiktor Kwapisiewicz
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.
2021-12-06net: Release 0.24.0.net/v0.24.0Justus Winter
2021-12-06net: Only enable hyper's server feature for tests.Justus Winter
2021-12-01Update tokio to 1.13.1.Nora Widdecke
- tokio 1.12 has RUSTSEC-2021-0124.
2021-11-29Drop unnecessary lifetime annotations.Nora Widdecke
- Continuation of e6a335b93a10620bcb7cbfa32e232949758f0c99.
2021-11-29Remove unnecessary borrows.Nora Widdecke
- Fixed with the help of clippy::needless_borrow.
2021-11-03net: Implement Signer and Decryptor for remote keys.Wiktor Kwapisiewicz
- Add sequoia_net::pks::unlock_signer. - Add sequoia_net::pks::unlock_decryptor.
2021-10-28net, openpgp: Fix private documentation.Nora Widdecke
2021-10-25ffi, net, sq: Update to tokio 1.0.Nora Widdecke
- 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.
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-10-11net: Correct link.Nora Widdecke
2021-09-30Allow if conditions that use complex codeLars Wirzenius
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
2021-09-30Add an is_empty method when len is thereLars Wirzenius
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
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-30Drop pointless @_ match pattern bindingsLars Wirzenius
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
2021-09-30Avoid naming field setting it from variable of the same nameLars Wirzenius
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
2021-09-30Drop unnecessary clone on a value that implements CopyLars Wirzenius
This was found by the clippy clone_on_copy lint: https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
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-08-30net: Implement Update Manifests.Justus Winter
2021-08-30net: Enable rand's getrandom feature for rand::rngs::OsRng.Justus Winter
2021-08-27Convert markdown to intra-doc links.Nora Widdecke
- Apply cargo intraconv.
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 redundant clone().Nora Widdecke
- https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
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 lazy evaluation.Nora Widdecke
- https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call
2021-03-31net: Protect against redirection loops in WKD requests.Wiktor Kwapisiewicz
- Use explicit depth to indicate how many redirects have been executed and break the loop if the number is bigger than 10. - Using `reqwest` was considered but rejected due to Tokio version incompatibility (`reqwest` insists on using Tokio 1 while Sequoia uses 0.2 in many places).
2021-03-31net: Follow redirects when using WKD lookup.Wiktor Kwapisiewicz
- See: https://lists.gnupg.org/pipermail/gnupg-devel/2018-May/033736.html - This solves lookups on domains that do redirects such as kernel.org - Fixes #666.
2021-01-21net: Release 0.23.0.net/v0.23.0Justus Winter
2021-01-20Add branding to all crates.Justus Winter
2021-01-15net: Make conversion from u8 to Policy fallible.Justus Winter
2021-01-15net: Decouple from core.Justus Winter
- Move core::NetworkPolicy to net::Policy, update all code accordingly.
2020-12-16Release 1.0.0.v1.0.0Justus Winter
- Release buffered-reader 1.0.0, sequoia-openpgp 1.0.0, and sequoia-sqv 1.0.0. - Also release sequoia-sop 0.22.0.
2020-12-11Release 0.21.0.v0.21.0Justus Winter
2020-12-11Correct minimal versions.Nora Widdecke
- Versions required by feature or API usage: - anyhow 1.0.18. - policy::test::reject_seip_packet and policy::test::reject_cipher' fail - We use `impl From<anyhow::Error> for Box<dyn std::error::Error + Send + Sync + 'static>`, introduced in 1.0.5. - tokio 0.2.19 - We use `tokio::net::tcp::OwnedReadHalf`, introduced in 0.2.19. - chrono 0.4.10 - We use the `std` feature, introduced in 0.4.10. - thiserror 1.0.2 - futures and futures-util 0.3.5 - tempfile 3.1 - c_doctests require the same version of rand both as direct dependency and through tempfile. - Yanked versions: - structopt 0.3.11. 0.3.8 to 0.3.10 were yanked. - socket2 0.3.16. 0.3.0 to 0.3.15 were yanked. - Update our dependencies to the package versions required by other dependencies, e.g. structopt requires lazy_static 1.4.0. - clap 2.33 - lazy_static to 1.4.0 - libc to 0.2.66 - proc-macro2 to 1.0.7 - syn to 1.0.5. - winapi 0.3.8
2020-12-09net: Implement searching for email addresses via hkp.Justus Winter
2020-12-09net: Add note.Justus Winter
2020-12-09net: Allow hkp queries by KeyHandle.Justus Winter
2020-11-28net: do not implement openpgp::serialize traits for KeyRingAzul
- We might implement it for an iterator over certs at some point. But in this case a simple `export` function is all we need. - This will also allow us to seal the `Serialize` and `Marshal` traits.
2020-11-27openpgp: Add Cert::merge_public and Cert::merge_public_and_secret.Justus Winter
- Secret key material is not authenticated by OpenPGP, so care must be taken when merging certificates. - Rename Cert::merge to Cert::merge_public_and_secret. - Add new function Cert::merge_public. This function can be used to merge certificates from untrusted sources as it ignores secret key material that cannot be authenticated by OpenPGP. - Fixes #584.
2020-11-12openpgp: Make crypto::Hash::digest fallible.Justus Winter
2020-10-23update net to futures=0.2amesgen
2020-10-14Release 0.20.0.v0.20.0Justus Winter
2020-10-14Use 'Examples' for the examples section.Justus Winter
- See #480.