diff --git a/Cargo.lock b/Cargo.lock index cbf750e16..cb65fc6b6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -530,19 +530,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" -dependencies = [ - "byteorder", - "iovec", -] - -[[package]] -name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" dependencies = [ "serde", ] @@ -741,7 +731,7 @@ version = "4.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" dependencies = [ - "bytes 1.4.0", + "bytes", "memchr", ] @@ -1812,7 +1802,7 @@ version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" dependencies = [ - "bytes 1.4.0", + "bytes", "fnv", "futures-core", "futures-sink", @@ -1930,7 +1920,7 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ - "bytes 1.4.0", + "bytes", "fnv", "itoa 1.0.9", ] @@ -1941,7 +1931,7 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ - "bytes 1.4.0", + "bytes", "http", "pin-project-lite", ] @@ -1970,7 +1960,7 @@ version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ - "bytes 1.4.0", + "bytes", "futures-channel", "futures-core", "futures-util", @@ -1994,7 +1984,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "bytes 1.4.0", + "bytes", "hyper", "native-tls", "tokio", @@ -2204,15 +2194,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "iovec" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -dependencies = [ - "libc", -] - [[package]] name = "ipnet" version = "2.8.0" @@ -3531,7 +3512,7 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6435842fc2fea44b528719eb8c32203bbc1bb2f5b619fbe0c0a3d8350fd8d2a8" dependencies = [ - "bytes 1.4.0", + "bytes", "futures", "pin-project-lite", ] @@ -3616,7 +3597,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" dependencies = [ "base64 0.21.2", - "bytes 1.4.0", + "bytes", "encoding_rs", "futures-core", "futures-util", @@ -4262,7 +4243,7 @@ dependencies = [ "ahash 0.8.3", "atoi", "byteorder", - "bytes 1.4.0", + "bytes", "crc", "crossbeam-queue", "dotenvy", @@ -4346,7 +4327,7 @@ dependencies = [ "base64 0.21.2", "bitflags 2.3.3", "byteorder", - "bytes 1.4.0", + "bytes", "crc", "digest 0.10.7", "dotenvy", @@ -4714,7 +4695,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fbe522898e35407a8e60dc3870f7579fea2fc262a6a6072eccdd37ae1e1d91e" dependencies = [ "anyhow", - "bytes 1.4.0", + "bytes", "cocoa", "dirs-next", "embed_plist", @@ -4826,7 +4807,7 @@ dependencies = [ "authenticator", "base64 0.21.2", "byteorder", - "bytes 0.4.12", + "bytes", "chrono", "log", "once_cell", @@ -5245,7 +5226,7 @@ checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" dependencies = [ "autocfg", "backtrace", - "bytes 1.4.0", + "bytes", "libc", "mio", "num_cpus", @@ -5295,7 +5276,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ - "bytes 1.4.0", + "bytes", "futures-core", "futures-sink", "pin-project-lite", @@ -5437,7 +5418,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" dependencies = [ "byteorder", - "bytes 1.4.0", + "bytes", "data-encoding", "http", "httparse", diff --git a/plugins/authenticator/Cargo.toml b/plugins/authenticator/Cargo.toml index 231bf02cb..e0e71a75a 100644 --- a/plugins/authenticator/Cargo.toml +++ b/plugins/authenticator/Cargo.toml @@ -20,7 +20,7 @@ once_cell = "1" sha2 = "0.10" base64 = "0.21" chrono = "0.4" -bytes = "0.4" +bytes = "1" byteorder = "1" openssl = "0.10" diff --git a/plugins/authenticator/src/u2f_crate/authorization.rs b/plugins/authenticator/src/u2f_crate/authorization.rs index 611ab8322..35a1a3e1e 100644 --- a/plugins/authenticator/src/u2f_crate/authorization.rs +++ b/plugins/authenticator/src/u2f_crate/authorization.rs @@ -39,7 +39,7 @@ pub fn parse_sign_response( let mut msg = vec![]; msg.put(app_id_hash.as_ref()); - msg.put(*user_presence_flag); + msg.put_u8(*user_presence_flag); msg.put(counter); msg.put(client_data_hash.as_ref()); @@ -61,5 +61,5 @@ pub fn parse_sign_response( fn get_counter(counter: &[u8]) -> u32 { let mut buf = Cursor::new(counter); - buf.get_u32_be() + buf.get_u32() }