From a41cbda751d515032859d72656fda3d219300ecb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 14 Sep 2016 16:42:26 -0400 Subject: Store information about backed up keys in ~/.keysafe/backup.log This can be deleted by the user at any time, but it's useful in case a server is known to be compromised, or a problem is found with keysafe's implementation that makes a backup insecure. This commit was sponsored by Nick Daly on Patreon. --- Storage.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Storage.hs') diff --git a/Storage.hs b/Storage.hs index b922501..2d9f631 100644 --- a/Storage.hs +++ b/Storage.hs @@ -9,6 +9,7 @@ module Storage (module Storage, module Types.Storage) where import Types import Types.Storage +import Types.Server import Share import Storage.Local import Storage.Network @@ -45,11 +46,11 @@ type UpdateProgress = IO () -- -- TODO: Add shuffling and queueing/chaffing to prevent -- correlation of related shares. -storeShares :: StorageLocations -> ShareIdents -> [S.Set Share] -> UpdateProgress -> IO (StoreResult, Bool) +storeShares :: StorageLocations -> ShareIdents -> [S.Set Share] -> UpdateProgress -> IO (StoreResult, Bool, [Storage]) storeShares (StorageLocations locs) allsis shares updateprogress = do - (r, usedlocs) <- go allsis shares [] False + ((r, anyqueued), usedlocs) <- go allsis shares [] False _ <- mapM_ obscureShares usedlocs - return r + return (r, anyqueued, usedlocs) where go sis (s:rest) usedlocs anyqueued = do let (is, sis') = nextShareIdents sis -- cgit v1.2.3