summaryrefslogtreecommitdiff
path: root/KeyRing.hs
diff options
context:
space:
mode:
Diffstat (limited to 'KeyRing.hs')
-rw-r--r--KeyRing.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/KeyRing.hs b/KeyRing.hs
index 2f8f6ec..6fa97d5 100644
--- a/KeyRing.hs
+++ b/KeyRing.hs
@@ -88,7 +88,7 @@ type UsageTag = String
88type Initializer = String 88type Initializer = String
89type PassWordFile = InputFile 89type PassWordFile = InputFile
90 90
91data FileType = KeyRingFile PassWordFile 91data FileType = KeyRingFile (Maybe PassWordFile)
92 | PEMFile UsageTag 92 | PEMFile UsageTag
93 | WalletFile -- (Maybe UsageTag) 93 | WalletFile -- (Maybe UsageTag)
94 94
@@ -101,7 +101,7 @@ isring (KeyRingFile {}) = True
101isring _ = False 101isring _ = False
102 102
103pwfile (KeyRingFile f) = f 103pwfile (KeyRingFile f) = f
104pwfile _ = HomeSec 104pwfile _ = Nothing
105 105
106iswallet (WalletFile {}) = True 106iswallet (WalletFile {}) = True
107iswallet _ = False 107iswallet _ = False
@@ -279,6 +279,7 @@ data KikiReportAction =
279 | ExternallyGeneratedFile 279 | ExternallyGeneratedFile
280 | UnableToExport KeyAlgorithm String 280 | UnableToExport KeyAlgorithm String
281 | FailedFileWrite 281 | FailedFileWrite
282 deriving Show
282 283
283data KikiResult a = KikiResult 284data KikiResult a = KikiResult
284 { kikiCondition :: KikiCondition a 285 { kikiCondition :: KikiCondition a
@@ -1173,9 +1174,9 @@ runKeyRing keyring = do
1173 -- TODO: head will throw an exception if a File Descriptor keyring 1174 -- TODO: head will throw an exception if a File Descriptor keyring
1174 -- file is present. We probably should change OriginMap to use InputFile 1175 -- file is present. We probably should change OriginMap to use InputFile
1175 -- instead of FilePath. 1176 -- instead of FilePath.
1176 Traversable.mapM (cachedContents secring pubring . pwfile . snd) 1177 Traversable.mapM (cachedContents secring pubring . fromJust . pwfile . snd)
1177 (Map.mapKeys (head . resolveInputFile secring pubring) 1178 (Map.mapKeys (head . resolveInputFile secring pubring)
1178 $ Map.filter (isring . snd) $ kFiles keyring) 1179 $ Map.filter (isJust . pwfile . snd) $ kFiles keyring)
1179 1180
1180 unkeysRef <- newIORef Map.empty 1181 unkeysRef <- newIORef Map.empty
1181 1182