diff options
author | joe <joe@jerkface.net> | 2014-05-03 01:14:12 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2014-05-03 01:14:12 -0400 |
commit | be0e20cbb8f904a5091f88f32f353b5abed5cb06 (patch) | |
tree | 59f8498f93f4251f3e44f70ee1417fbf39802501 /KeyRing.hs | |
parent | 4f9d3fc480a1bace6235aca3197febb7a3eb10cf (diff) |
more haddock
Diffstat (limited to 'KeyRing.hs')
-rw-r--r-- | KeyRing.hs | 19 |
1 files changed, 16 insertions, 3 deletions
@@ -31,6 +31,7 @@ module KeyRing | |||
31 | , Access(..) | 31 | , Access(..) |
32 | , KeyFilter(..) | 32 | , KeyFilter(..) |
33 | , KeyRingOperation(..) | 33 | , KeyRingOperation(..) |
34 | , PassphraseSpec(..) | ||
34 | , errorString | 35 | , errorString |
35 | , reportString | 36 | , reportString |
36 | , KeyRingRuntime(..) | 37 | , KeyRingRuntime(..) |
@@ -275,11 +276,16 @@ data PacketUpdate = InducerSignature String [SignatureSubpacket] | |||
275 | noManip :: KeyRingRuntime -> KeyData -> [PacketUpdate] | 276 | noManip :: KeyRingRuntime -> KeyData -> [PacketUpdate] |
276 | noManip _ _ = [] | 277 | noManip _ _ = [] |
277 | 278 | ||
279 | -- | This type is used to indicate where to obtain passphrases. | ||
278 | data PassphraseSpec = PassphraseSpec | 280 | data PassphraseSpec = PassphraseSpec |
279 | { passSpecRingFile :: Maybe FilePath | 281 | { passSpecRingFile :: Maybe FilePath |
282 | -- ^ If not Nothing, the passphrase is to be used for packets | ||
283 | -- from this file. | ||
280 | , passSpecKeySpec :: Maybe String | 284 | , passSpecKeySpec :: Maybe String |
281 | -- ^ non-Nothing value reserved for future use (TODO). | 285 | -- ^ Non-Nothing value reserved for future use. |
286 | -- (TODO: Use this to implement per-key passphrase associations). | ||
282 | , passSpecPassFile :: InputFile | 287 | , passSpecPassFile :: InputFile |
288 | -- ^ The passphrase will be read from this file or file descriptor. | ||
283 | } | 289 | } |
284 | 290 | ||
285 | data Transform = Autosign | 291 | data Transform = Autosign |
@@ -467,6 +473,13 @@ instance Applicative KikiCondition where | |||
467 | Left err -> err | 473 | Left err -> err |
468 | Left err -> err | 474 | Left err -> err |
469 | 475 | ||
476 | -- | This type is used to describe events triggered by a | ||
477 | -- 'runKeyRing'. In addition to normal feedback | ||
478 | -- (e.g. 'NewPacket'), it also may indicate non-fatal | ||
479 | -- IO exceptions (e.g. FailedExternal). Because a 'KeyRingOperation' | ||
480 | -- may describe a very intricate multifaceted algorithm with many | ||
481 | -- inputs and outputs, an operation may be partially (or even mostly) | ||
482 | -- successful even when some aspect failed. | ||
470 | data KikiReportAction = | 483 | data KikiReportAction = |
471 | NewPacket String | 484 | NewPacket String |
472 | | MissingPacket String | 485 | | MissingPacket String |
@@ -505,8 +518,8 @@ data KikiResult a = KikiResult | |||
505 | { kikiCondition :: KikiCondition a | 518 | { kikiCondition :: KikiCondition a |
506 | -- ^ The result or a fatal error condition. | 519 | -- ^ The result or a fatal error condition. |
507 | , kikiReport :: [ (FilePath, KikiReportAction) ] | 520 | , kikiReport :: [ (FilePath, KikiReportAction) ] |
508 | -- ^ A list of non-fatal warning messages and the files | 521 | -- ^ A list of non-fatal warnings and informational messages |
509 | -- that triggered them. | 522 | -- along with the files that triggered them. |
510 | } | 523 | } |
511 | 524 | ||
512 | keyPacket :: KeyData -> Packet | 525 | keyPacket :: KeyData -> Packet |