Skip to content

Commit

Permalink
fix(deps): update rust crate bytes to v1 (#783)
Browse files Browse the repository at this point in the history
* fix(deps): update rust crate bytes to v1

* adapt api

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FabianLars <fabianlars@fabianlars.de>
  • Loading branch information
renovate[bot] and FabianLars authored Nov 30, 2023
1 parent 3df9bc7 commit c98545b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 39 deletions.
53 changes: 17 additions & 36 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugins/authenticator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
4 changes: 2 additions & 2 deletions plugins/authenticator/src/u2f_crate/authorization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand All @@ -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()
}

0 comments on commit c98545b

Please sign in to comment.