Skip to content

Commit

Permalink
Fix comments from review
Browse files Browse the repository at this point in the history
  • Loading branch information
mkeeter committed Jan 2, 2024
1 parent d9e8420 commit ed1324f
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions upstairs/src/upstairs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3496,7 +3496,7 @@ pub(crate) mod test {
}))
.await;

// fake read response from downstairs that will fail decryption
// fake read response from downstairs that will successfully decrypt
let mut data = Vec::from([1u8; 512]);

let (nonce, tag, hash) = up
Expand Down Expand Up @@ -3614,6 +3614,7 @@ pub(crate) mod test {
);
}

/// Confirms that the encrypted read hash checksum works
#[tokio::test]
async fn bad_hash_on_encrypted_read_panic() {
let mut up = make_encrypted_upstairs();
Expand Down Expand Up @@ -3642,14 +3643,7 @@ pub(crate) mod test {
.unwrap();

let nonce: [u8; 12] = nonce.into();
let mut tag: [u8; 16] = tag.into();

// alter tag
if tag[3] == 0xFF {
tag[3] = 0x00;
} else {
tag[3] = 0xFF;
}
let tag: [u8; 16] = tag.into();

let responses = Ok(vec![ReadResponse {
eid: 0,
Expand Down

0 comments on commit ed1324f

Please sign in to comment.