summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--KeyRing.hs12
-rw-r--r--kiki.cabal2
2 files changed, 5 insertions, 9 deletions
diff --git a/KeyRing.hs b/KeyRing.hs
index a15fdeb..0fc30ef 100644
--- a/KeyRing.hs
+++ b/KeyRing.hs
@@ -19,13 +19,12 @@ import Data.Functor
19import Data.Monoid 19import Data.Monoid
20import Data.Tuple ( swap ) 20import Data.Tuple ( swap )
21import Data.Bits ( (.|.) ) 21import Data.Bits ( (.|.) )
22import Control.Applicative ( Applicative, pure, liftA2, (<$>), (<*>) ) 22import Control.Applicative ( Applicative, pure, liftA2, (<*>) )
23import System.Directory ( getHomeDirectory, doesFileExist, createDirectoryIfMissing ) 23import System.Directory ( getHomeDirectory, doesFileExist, createDirectoryIfMissing )
24import Control.Arrow ( first, second ) 24import Control.Arrow ( first, second )
25import Data.OpenPGP.Util (verify,fingerprint,decryptSecretKey,pgpSign) 25import Data.OpenPGP.Util (verify,fingerprint,decryptSecretKey,pgpSign)
26import Data.ByteString.Lazy ( ByteString ) 26import Data.ByteString.Lazy ( ByteString )
27import Text.Show.Pretty as PP ( ppShow ) 27import Text.Show.Pretty as PP ( ppShow )
28import Data.Word ( Word8 )
29import Data.Binary {- decode, decodeOrFail -} 28import Data.Binary {- decode, decodeOrFail -}
30import ControlMaybe ( handleIO_ ) 29import ControlMaybe ( handleIO_ )
31import Data.ASN1.Types ( toASN1, ASN1Object, fromASN1 30import Data.ASN1.Types ( toASN1, ASN1Object, fromASN1
@@ -38,7 +37,6 @@ import qualified Data.Map as Map
38import qualified Data.ByteString.Lazy as L ( unpack, pack, null, readFile, writeFile 37import qualified Data.ByteString.Lazy as L ( unpack, pack, null, readFile, writeFile
39 , ByteString, toChunks ) 38 , ByteString, toChunks )
40import qualified Data.ByteString as S ( ByteString, unpack, splitAt, concat, cons, spanEnd, hGetContents, readFile) 39import qualified Data.ByteString as S ( ByteString, unpack, splitAt, concat, cons, spanEnd, hGetContents, readFile)
41import qualified Data.ByteString.Lazy.Char8 as Char8 ( span, unpack, break, concat, lines )
42import qualified Crypto.Types.PubKey.ECC as ECC 40import qualified Crypto.Types.PubKey.ECC as ECC
43import qualified Codec.Binary.Base32 as Base32 41import qualified Codec.Binary.Base32 as Base32
44import qualified Codec.Binary.Base64 as Base64 42import qualified Codec.Binary.Base64 as Base64
@@ -50,10 +48,9 @@ import System.Posix.Files ( modificationTime, getFileStatus
50 , setFileCreationMask, setFileTimes ) 48 , setFileCreationMask, setFileTimes )
51import System.FilePath ( takeDirectory ) 49import System.FilePath ( takeDirectory )
52import System.IO (hPutStrLn,withFile,IOMode(..)) 50import System.IO (hPutStrLn,withFile,IOMode(..))
53import Data.Binary ( encode )
54import Data.IORef 51import Data.IORef
55import System.Posix.IO (fdToHandle,fdRead) 52import System.Posix.IO ( fdToHandle )
56import qualified Data.Traversable as Traversable (mapM,forM,sequence) 53import qualified Data.Traversable as Traversable ( mapM )
57import Data.Traversable ( sequenceA ) 54import Data.Traversable ( sequenceA )
58#if ! MIN_VERSION_base(4,6,0) 55#if ! MIN_VERSION_base(4,6,0)
59import GHC.Exts ( Down(..) ) 56import GHC.Exts ( Down(..) )
@@ -1158,7 +1155,6 @@ writeRingKeys krd rt {- db wk secring pubring -} = do
1158 let isring (KeyRingFile {}) = True 1155 let isring (KeyRingFile {}) = True
1159 isring _ = False 1156 isring _ = False
1160 db = rtKeyDB rt 1157 db = rtKeyDB rt
1161 wk = rtWorkingKey rt
1162 secring = rtSecring rt 1158 secring = rtSecring rt
1163 pubring = rtPubring rt 1159 pubring = rtPubring rt
1164 let s = do 1160 let s = do
@@ -2043,7 +2039,7 @@ merge_ db filename qs = foldl mergeit db (zip [0..] qs)
2043 , fingerprint b 2039 , fingerprint b
2044 , PP.ppShow b 2040 , PP.ppShow b
2045 ] 2041 ]
2046 subcomp_m a b = subcomp (packet a) (packet b) 2042 -- subcomp_m a b = subcomp (packet a) (packet b)
2047 2043
2048 mergeUid :: Int ->(Packet,a) -> Maybe ([SigAndTrust],OriginMap) -> Maybe ([SigAndTrust],OriginMap) 2044 mergeUid :: Int ->(Packet,a) -> Maybe ([SigAndTrust],OriginMap) -> Maybe ([SigAndTrust],OriginMap)
2049 mergeUid n (UserIDPacket s,_) Nothing = Just ([],Map.singleton filename (origin MarkerPacket n)) 2045 mergeUid n (UserIDPacket s,_) Nothing = Just ([],Map.singleton filename (origin MarkerPacket n))
diff --git a/kiki.cabal b/kiki.cabal
index a5ede74..118e0af 100644
--- a/kiki.cabal
+++ b/kiki.cabal
@@ -23,5 +23,5 @@ Executable kiki
23 unix, time, 23 unix, time,
24 containers -any, process -any, filepath -any, 24 containers -any, process -any, filepath -any,
25 network 25 network
26 ghc-options: -O2 -fwarn-unused-binds 26 ghc-options: -O2 -fwarn-unused-binds -fwarn-unused-imports
27 c-sources: dotlock.c 27 c-sources: dotlock.c