summaryrefslogtreecommitdiffhomepage
path: root/keysafe.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-08-11 20:44:07 -0400
committerJoey Hess <joeyh@joeyh.name>2016-08-11 20:44:07 -0400
commita3834e558cf6ae04826b44e65a02ee22286f7952 (patch)
tree571159729a9392579aa993e3f3da8dd58745c0b3 /keysafe.hs
parentab3594dacb0461ae5e253544f65c3e3d50eb721d (diff)
downloadkeysafe-a3834e558cf6ae04826b44e65a02ee22286f7952.tar.gz
write via temp file
avoids short reads, and also if a backup program came along while the write was happening, avoids short backups
Diffstat (limited to 'keysafe.hs')
-rw-r--r--keysafe.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/keysafe.hs b/keysafe.hs
index 02dc18a..94846f0 100644
--- a/keysafe.hs
+++ b/keysafe.hs
@@ -45,6 +45,7 @@ retrievedemo = do
let l = drop 1 $ zip [1..] (getIdents sis)
shards <- map (\(RetrieveSuccess s) -> s)
<$> mapM (uncurry (retrieveShard localFiles)) l
+ _ <- obscureShards localFiles
let esk = combineShards tunables shards
kek <- genKeyEncryptionKey tunables name password
-- TODO: need to solve the encryption puzzle