summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--KeyRing.hs17
-rw-r--r--kiki.hs1
2 files changed, 17 insertions, 1 deletions
diff --git a/KeyRing.hs b/KeyRing.hs
index f5d2938..0c1fc2a 100644
--- a/KeyRing.hs
+++ b/KeyRing.hs
@@ -253,6 +253,7 @@ data FileType = KeyRingFile
253 | WalletFile 253 | WalletFile
254 | DNSPresentation 254 | DNSPresentation
255 | Hosts 255 | Hosts
256 deriving (Eq,Ord,Enum,Show)
256 257
257-- | Use this type to indicate whether a file of type 'KeyRingFile' is expected 258-- | Use this type to indicate whether a file of type 'KeyRingFile' is expected
258-- to contain secret or public PGP key packets. Note that it is not supported 259-- to contain secret or public PGP key packets. Note that it is not supported
@@ -274,6 +275,7 @@ data KeyFilter = KF_None -- ^ No keys will be imported.
274 | KF_Authentic -- ^ Keys are imported if they belong to an authenticated 275 | KF_Authentic -- ^ Keys are imported if they belong to an authenticated
275 -- identity (signed or self-authenticating). 276 -- identity (signed or self-authenticating).
276 | KF_All -- ^ All keys will be imported. 277 | KF_All -- ^ All keys will be imported.
278 deriving (Eq,Ord,Show)
277 279
278-- | This type describes how 'runKeyRing' will treat a file. 280-- | This type describes how 'runKeyRing' will treat a file.
279data StreamInfo = StreamInfo { access :: Access 281data StreamInfo = StreamInfo { access :: Access
@@ -324,6 +326,7 @@ data StreamInfo = StreamInfo { access :: Access
324 -- ^ Per-file transformations that occur before the contents of a file are 326 -- ^ Per-file transformations that occur before the contents of a file are
325 -- spilled into the common pool. 327 -- spilled into the common pool.
326 } 328 }
329 deriving (Eq,Show)
327 330
328 331
329spillable :: StreamInfo -> Bool 332spillable :: StreamInfo -> Bool
@@ -398,6 +401,17 @@ data PassphraseSpec = PassphraseSpec
398 -- | Use this to carry pasphrases from a previous run. 401 -- | Use this to carry pasphrases from a previous run.
399 | PassphraseMemoizer (MappedPacket -> IO (KikiCondition Packet)) 402 | PassphraseMemoizer (MappedPacket -> IO (KikiCondition Packet))
400 403
404instance Show PassphraseSpec where
405 show (PassphraseSpec a b c) = "PassphraseSpec "++show (a,b,c)
406 show (PassphraseMemoizer _) = "PassphraseMemoizer"
407instance Eq PassphraseSpec where
408 PassphraseSpec a b c == PassphraseSpec d e f
409 = and [a==d,b==e,c==f]
410 _ == _
411 = False
412
413
414
401data Transform = 415data Transform =
402 Autosign 416 Autosign
403 -- ^ This operation will make signatures for any tor-style UID 417 -- ^ This operation will make signatures for any tor-style UID
@@ -410,7 +424,7 @@ data Transform =
410 | DeleteSubKey String 424 | DeleteSubKey String
411 -- ^ Delete the subkey specified by the given fingerprint and any 425 -- ^ Delete the subkey specified by the given fingerprint and any
412 -- associated signatures on that key. 426 -- associated signatures on that key.
413 deriving (Eq,Ord) 427 deriving (Eq,Ord,Show)
414 428
415-- | This type describes an idempotent transformation (merge or import) on a 429-- | This type describes an idempotent transformation (merge or import) on a
416-- set of GnuPG keyrings and other key files. 430-- set of GnuPG keyrings and other key files.
@@ -427,6 +441,7 @@ data KeyRingOperation = KeyRingOperation
427 -- files reside. Otherwise, the evironment variable $GNUPGHOME is consulted 441 -- files reside. Otherwise, the evironment variable $GNUPGHOME is consulted
428 -- and if that is not set, it falls back to $HOME/.gnupg. 442 -- and if that is not set, it falls back to $HOME/.gnupg.
429 } 443 }
444 deriving (Eq,Show)
430 445
431resolveInputFile :: InputFileContext -> InputFile -> [FilePath] 446resolveInputFile :: InputFileContext -> InputFile -> [FilePath]
432resolveInputFile ctx = resolve 447resolveInputFile ctx = resolve
diff --git a/kiki.hs b/kiki.hs
index 087e24f..0be591d 100644
--- a/kiki.hs
+++ b/kiki.hs
@@ -1280,6 +1280,7 @@ kiki "merge" args | "--help" `elem` args = do
1280 kiki "merge" [] 1280 kiki "merge" []
1281 -- TODO: more help 1281 -- TODO: more help
1282kiki "merge" args = do 1282kiki "merge" args = do
1283 hPutStrLn stderr $ show op
1283 KikiResult rt report <- runKeyRing op 1284 KikiResult rt report <- runKeyRing op
1284 case rt of 1285 case rt of
1285 KikiSuccess rt -> return () 1286 KikiSuccess rt -> return ()