This is an automated email from the ASF dual-hosted git repository.

mssun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave.git


The following commit(s) were added to refs/heads/master by this push:
     new 9ca556a  [crypto] Fix a bug that may output incorrect cmac values for 
small files (#342)
9ca556a is described below

commit 9ca556ad6979d5f2f52ea24eca099996c76f8f14
Author: Qinkun Bao <[email protected]>
AuthorDate: Sat Jun 6 02:00:47 2020 -0400

    [crypto] Fix a bug that may output incorrect cmac values for small files 
(#342)
---
 crypto/src/lib.rs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/crypto/src/lib.rs b/crypto/src/lib.rs
index a3ecc53..95e320f 100644
--- a/crypto/src/lib.rs
+++ b/crypto/src/lib.rs
@@ -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)
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to