Skip to content

Commit

Permalink
[crypto] Fix a bug that may output incorrect cmac values for small fi…
Browse files Browse the repository at this point in the history
…les (#342)
  • Loading branch information
qinkunbao committed Jun 6, 2020
1 parent 40fed0c commit 9ca556a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crypto/src/lib.rs
Expand Up @@ -212,6 +212,7 @@ impl TeaclaveFile128Key {
use std::io::Write;
let mut file = ProtectedFile::create_ex(path.as_ref(), &self.key)?;
file.write_all(content)?;
file.flush()?;
let cmac = file.current_meta_gmac()?;
Ok(cmac)
}
Expand Down

0 comments on commit 9ca556a

Please sign in to comment.