diff options
Diffstat (limited to 'KeyRing.hs')
-rw-r--r-- | KeyRing.hs | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -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. |
279 | data StreamInfo = StreamInfo { access :: Access | 281 | data 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 | ||
329 | spillable :: StreamInfo -> Bool | 332 | spillable :: 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 | ||
404 | instance Show PassphraseSpec where | ||
405 | show (PassphraseSpec a b c) = "PassphraseSpec "++show (a,b,c) | ||
406 | show (PassphraseMemoizer _) = "PassphraseMemoizer" | ||
407 | instance 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 | |||
401 | data Transform = | 415 | data 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 | ||
431 | resolveInputFile :: InputFileContext -> InputFile -> [FilePath] | 446 | resolveInputFile :: InputFileContext -> InputFile -> [FilePath] |
432 | resolveInputFile ctx = resolve | 447 | resolveInputFile ctx = resolve |