diff options
-rw-r--r-- | KeyRing.hs | 12 | ||||
-rw-r--r-- | kiki.cabal | 2 |
2 files changed, 5 insertions, 9 deletions
@@ -19,13 +19,12 @@ import Data.Functor | |||
19 | import Data.Monoid | 19 | import Data.Monoid |
20 | import Data.Tuple ( swap ) | 20 | import Data.Tuple ( swap ) |
21 | import Data.Bits ( (.|.) ) | 21 | import Data.Bits ( (.|.) ) |
22 | import Control.Applicative ( Applicative, pure, liftA2, (<$>), (<*>) ) | 22 | import Control.Applicative ( Applicative, pure, liftA2, (<*>) ) |
23 | import System.Directory ( getHomeDirectory, doesFileExist, createDirectoryIfMissing ) | 23 | import System.Directory ( getHomeDirectory, doesFileExist, createDirectoryIfMissing ) |
24 | import Control.Arrow ( first, second ) | 24 | import Control.Arrow ( first, second ) |
25 | import Data.OpenPGP.Util (verify,fingerprint,decryptSecretKey,pgpSign) | 25 | import Data.OpenPGP.Util (verify,fingerprint,decryptSecretKey,pgpSign) |
26 | import Data.ByteString.Lazy ( ByteString ) | 26 | import Data.ByteString.Lazy ( ByteString ) |
27 | import Text.Show.Pretty as PP ( ppShow ) | 27 | import Text.Show.Pretty as PP ( ppShow ) |
28 | import Data.Word ( Word8 ) | ||
29 | import Data.Binary {- decode, decodeOrFail -} | 28 | import Data.Binary {- decode, decodeOrFail -} |
30 | import ControlMaybe ( handleIO_ ) | 29 | import ControlMaybe ( handleIO_ ) |
31 | import Data.ASN1.Types ( toASN1, ASN1Object, fromASN1 | 30 | import Data.ASN1.Types ( toASN1, ASN1Object, fromASN1 |
@@ -38,7 +37,6 @@ import qualified Data.Map as Map | |||
38 | import qualified Data.ByteString.Lazy as L ( unpack, pack, null, readFile, writeFile | 37 | import qualified Data.ByteString.Lazy as L ( unpack, pack, null, readFile, writeFile |
39 | , ByteString, toChunks ) | 38 | , ByteString, toChunks ) |
40 | import qualified Data.ByteString as S ( ByteString, unpack, splitAt, concat, cons, spanEnd, hGetContents, readFile) | 39 | import qualified Data.ByteString as S ( ByteString, unpack, splitAt, concat, cons, spanEnd, hGetContents, readFile) |
41 | import qualified Data.ByteString.Lazy.Char8 as Char8 ( span, unpack, break, concat, lines ) | ||
42 | import qualified Crypto.Types.PubKey.ECC as ECC | 40 | import qualified Crypto.Types.PubKey.ECC as ECC |
43 | import qualified Codec.Binary.Base32 as Base32 | 41 | import qualified Codec.Binary.Base32 as Base32 |
44 | import qualified Codec.Binary.Base64 as Base64 | 42 | import qualified Codec.Binary.Base64 as Base64 |
@@ -50,10 +48,9 @@ import System.Posix.Files ( modificationTime, getFileStatus | |||
50 | , setFileCreationMask, setFileTimes ) | 48 | , setFileCreationMask, setFileTimes ) |
51 | import System.FilePath ( takeDirectory ) | 49 | import System.FilePath ( takeDirectory ) |
52 | import System.IO (hPutStrLn,withFile,IOMode(..)) | 50 | import System.IO (hPutStrLn,withFile,IOMode(..)) |
53 | import Data.Binary ( encode ) | ||
54 | import Data.IORef | 51 | import Data.IORef |
55 | import System.Posix.IO (fdToHandle,fdRead) | 52 | import System.Posix.IO ( fdToHandle ) |
56 | import qualified Data.Traversable as Traversable (mapM,forM,sequence) | 53 | import qualified Data.Traversable as Traversable ( mapM ) |
57 | import Data.Traversable ( sequenceA ) | 54 | import Data.Traversable ( sequenceA ) |
58 | #if ! MIN_VERSION_base(4,6,0) | 55 | #if ! MIN_VERSION_base(4,6,0) |
59 | import GHC.Exts ( Down(..) ) | 56 | import 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)) |
@@ -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 |