You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@teaclave.apache.org by ms...@apache.org on 2020/06/06 06:00:56 UTC

[incubator-teaclave] branch master updated: [crypto] Fix a bug that may output incorrect cmac values for small files (#342)

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 <qi...@gmail.com>
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: commits-unsubscribe@teaclave.apache.org
For additional commands, e-mail: commits-help@teaclave.apache.org