diff options
author | joe <joe@jerkface.net> | 2014-04-30 20:14:33 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2014-04-30 20:14:33 -0400 |
commit | 6a6cc6675271205e4759383456118f5dc33f617b (patch) | |
tree | 984044c099158e78bc8872c52b5b8175be78c57a /KeyRing.hs | |
parent | 0a69db51f2551a83a693af36bce360aa43390f90 (diff) |
resolveForReport
Diffstat (limited to 'KeyRing.hs')
-rw-r--r-- | KeyRing.hs | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -266,6 +266,11 @@ resolveInputFile ctx = resolve | |||
266 | resolve (ArgFile f) = return f | 266 | resolve (ArgFile f) = return f |
267 | resolve _ = [] | 267 | resolve _ = [] |
268 | 268 | ||
269 | resolveForReport :: Maybe InputFileContext -> InputFile -> FilePath | ||
270 | resolveForReport mctx (FileDesc fd) = resolveForReport mctx (ArgFile str) | ||
271 | where str = "&" ++ show fd | ||
272 | resolveForReport mctx f = concat $ resolveInputFile ctx f | ||
273 | where ctx = fromMaybe (InputFileContext "&secret" "&public") mctx | ||
269 | 274 | ||
270 | filesToLock :: | 275 | filesToLock :: |
271 | KeyRingOperation -> InputFileContext -> [FilePath] | 276 | KeyRingOperation -> InputFileContext -> [FilePath] |
@@ -1589,11 +1594,10 @@ writePEMKeys doDecrypt db exports = do | |||
1589 | then do | 1594 | then do |
1590 | rs <- mapM (\(f,p) -> writeKeyToFile False "PEM" (ArgFile f) p) | 1595 | rs <- mapM (\(f,p) -> writeKeyToFile False "PEM" (ArgFile f) p) |
1591 | (rights ds') | 1596 | (rights ds') |
1592 | return $ KikiSuccess (map (first resolve) $ concat rs) | 1597 | return $ KikiSuccess (map (first $ resolveForReport Nothing) $ concat rs) |
1593 | else do | 1598 | else do |
1594 | return (head $ lefts ds') | 1599 | return (head $ lefts ds') |
1595 | where | 1600 | where |
1596 | resolve f = concat $ resolveInputFile (InputFileContext "" "") f | ||
1597 | decryptKeys (fname,subspec,[p],_) = do | 1601 | decryptKeys (fname,subspec,[p],_) = do |
1598 | pun <- doDecrypt p | 1602 | pun <- doDecrypt p |
1599 | try pun $ \pun -> do | 1603 | try pun $ \pun -> do |