diff --git a/plugins/authenticator/Cargo.toml b/plugins/authenticator/Cargo.toml index 339cd1687..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 = "1.5" +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() }