summaryrefslogtreecommitdiffstats
path: root/sq
diff options
context:
space:
mode:
authorNora Widdecke <nora@sequoia-pgp.org>2021-09-28 12:18:38 +0200
committerNora Widdecke <nora@sequoia-pgp.org>2021-10-25 18:25:05 +0200
commit463b8702ab672e1f528968f46f81b8cfdf2005c8 (patch)
tree52be0e0741130c9507a26d6865ef34562baf6b85 /sq
parent6257a2e0197190f5f2951693256d05d32437bd55 (diff)
ffi, net, sq: Update to tokio 1.0.
- 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.
Diffstat (limited to 'sq')
-rw-r--r--sq/Cargo.toml2
-rw-r--r--sq/src/commands/net.rs6
2 files changed, 3 insertions, 5 deletions
diff --git a/sq/Cargo.toml b/sq/Cargo.toml
index 03cd657a..560e570e 100644
--- a/sq/Cargo.toml
+++ b/sq/Cargo.toml
@@ -36,7 +36,7 @@ clap = { version = "2.33", features = ["wrap_help"] }
itertools = "0.9"
tempfile = "3.1"
term_size = "0.3"
-tokio = { version = "0.2.19", features = ["rt-core", "io-util", "io-driver"], optional = true }
+tokio = { version = "1", optional = true }
rpassword = "5.0"
[build-dependencies]
diff --git a/sq/src/commands/net.rs b/sq/src/commands/net.rs
index 899c65fd..dc3f10ee 100644
--- a/sq/src/commands/net.rs
+++ b/sq/src/commands/net.rs
@@ -49,8 +49,7 @@ pub fn dispatch_keyserver(config: Config, m: &clap::ArgMatches) -> Result<()> {
KeyServer::keys_openpgp_org(network_policy)
}.context("Malformed keyserver URI")?;
- let mut rt = tokio::runtime::Builder::new()
- .basic_scheduler()
+ let rt = tokio::runtime::Builder::new_current_thread()
.enable_io()
.enable_time()
.build()?;
@@ -113,8 +112,7 @@ pub fn dispatch_keyserver(config: Config, m: &clap::ArgMatches) -> Result<()> {
pub fn dispatch_wkd(config: Config, m: &clap::ArgMatches) -> Result<()> {
let network_policy = parse_network_policy(m);
- let mut rt = tokio::runtime::Builder::new()
- .basic_scheduler()
+ let rt = tokio::runtime::Builder::new_current_thread()
.enable_io()
.enable_time()
.build()?;