summaryrefslogtreecommitdiff
path: root/lib/KeyRing
diff options
context:
space:
mode:
Diffstat (limited to 'lib/KeyRing')
-rw-r--r--lib/KeyRing/BuildKeyDB.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/KeyRing/BuildKeyDB.hs b/lib/KeyRing/BuildKeyDB.hs
index 234d2ef..8e54127 100644
--- a/lib/KeyRing/BuildKeyDB.hs
+++ b/lib/KeyRing/BuildKeyDB.hs
@@ -40,7 +40,8 @@ import qualified Data.ByteString as S (ByteString, breakSubstring,
40import Data.ByteString.Lazy (ByteString) 40import Data.ByteString.Lazy (ByteString)
41import qualified Data.ByteString.Lazy as L (ByteString, concat, empty, 41import qualified Data.ByteString.Lazy as L (ByteString, concat, empty,
42 fromChunks, hGetContents, 42 fromChunks, hGetContents,
43 null, readFile, toChunks) 43 null, readFile, toChunks,
44 toStrict)
44import Data.Char 45import Data.Char
45import Data.Function 46import Data.Function
46import Data.List 47import Data.List
@@ -118,6 +119,7 @@ import Transforms
118import PacketTranscoder 119import PacketTranscoder
119import GnuPGAgent 120import GnuPGAgent
120import ByteStringUtil 121import ByteStringUtil
122import Text.XXD
121 123
122-- | buildKeyDB 124-- | buildKeyDB
123-- 125--
@@ -661,6 +663,8 @@ merge_ db filename qs = foldl mergeit db (zip [0..] qs)
661 where 663 where
662 update Nothing = Just $ KeyData (mappedPacketWithHint filename p n) [] Map.empty Map.empty 664 update Nothing = Just $ KeyData (mappedPacketWithHint filename p n) [] Map.empty Map.empty
663 update (Just kd) = dbInsertPacket kd filename adding 665 update (Just kd) = dbInsertPacket kd filename adding
666 mergeit _ (_,(_,_,(UnsupportedPacket tag bytes,_)))
667 = error $ unlines $ ("Unsupported packet type "++show tag) : xxd 0 (L.toStrict bytes)
664 mergeit _ (_,(_,_,p)) = error $ "Unexpected PGP packet 3: "++whatP p 668 mergeit _ (_,(_,_,p)) = error $ "Unexpected PGP packet 3: "++whatP p
665 669
666 whatP (a,_) = concat . take 1 . words . show $ a 670 whatP (a,_) = concat . take 1 . words . show $ a