summaryrefslogtreecommitdiff
path: root/KeyRing.hs
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2014-04-30 22:20:57 -0400
committerjoe <joe@jerkface.net>2014-04-30 22:20:57 -0400
commit298d4805cc7e3c16a71550f3a3bd0f4945c67772 (patch)
tree9a3a353ecf94c9a204794afa9bd407f605c28977 /KeyRing.hs
parent6030b4359ed601dff8267f403fc6c7de21a20b1a (diff)
todo stubs
Diffstat (limited to 'KeyRing.hs')
-rw-r--r--KeyRing.hs19
1 files changed, 16 insertions, 3 deletions
diff --git a/KeyRing.hs b/KeyRing.hs
index c645e96..08bde7a 100644
--- a/KeyRing.hs
+++ b/KeyRing.hs
@@ -203,7 +203,10 @@ data StreamInfo = StreamInfo
203 -- Note that this is currently treated as a boolean 203 -- Note that this is currently treated as a boolean
204 -- flag. KF_None means the file is not spillable 204 -- flag. KF_None means the file is not spillable
205 -- and anything else means that it is. 205 -- and anything else means that it is.
206 , initializer :: Maybe String } 206 , initializer :: Maybe String
207 , transforms :: [Transform]
208 -- ^ TODO: currently ignored
209 }
207 210
208 211
209spillable :: StreamInfo -> Bool 212spillable :: StreamInfo -> Bool
@@ -251,10 +254,20 @@ data PacketUpdate = InducerSignature String [SignatureSubpacket]
251noManip :: KeyRingRuntime -> KeyData -> [PacketUpdate] 254noManip :: KeyRingRuntime -> KeyData -> [PacketUpdate]
252noManip _ _ = [] 255noManip _ _ = []
253 256
257data PassphraseSpec = PassphraseSpec (Maybe FilePath) (Maybe String) InputFile
258
259data Transform = Autosign
260
254data KeyRingOperation = KeyRingOperation 261data KeyRingOperation = KeyRingOperation
255 { kFiles :: Map.Map InputFile StreamInfo 262 { kFiles :: Map.Map InputFile StreamInfo
263 , kPassphrases :: [PassphraseSpec]
264 -- ^ TODO: this is currently ignored
265 , kUnspilled :: Map.Map InputFile KeyDB
266 -- ^ TODO: this is currently ignored
267 , kTransform :: [Transform]
268 -- ^ TODO: this is currently ignored
256 , kManip :: KeyRingRuntime -> KeyData -> [PacketUpdate]--[KeyRingAddress PacketUpdate] 269 , kManip :: KeyRingRuntime -> KeyData -> [PacketUpdate]--[KeyRingAddress PacketUpdate]
257 -- TODO: change kManip to [Transform] 270 -- ^ TODO: this should be obsoleted by kTransform
258 , homeSpec :: Maybe String 271 , homeSpec :: Maybe String
259 } 272 }
260 273
@@ -1144,7 +1157,7 @@ buildKeyDB doDecrypt ctx grip0 keyring = do
1144 let us = mapMaybe usageFromFilter [fill stream,spill stream] 1157 let us = mapMaybe usageFromFilter [fill stream,spill stream]
1145 usage <- take 1 us 1158 usage <- take 1 us
1146 guard $ all (==usage) $ drop 1 us 1159 guard $ all (==usage) $ drop 1 us
1147 -- TODO: KikiCondition for spill/fill usage mismatch? 1160 -- TODO: KikiCondition reporting for spill/fill usage mismatch?
1148 let (topspec,subspec) = parseSpec grip usage 1161 let (topspec,subspec) = parseSpec grip usage
1149 ms = map fst $ filterMatches topspec (Map.toList db) 1162 ms = map fst $ filterMatches topspec (Map.toList db)
1150 cmd = initializer stream 1163 cmd = initializer stream