summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2019-07-09 17:00:53 -0400
committerAndrew Cady <d@jerkface.net>2019-07-09 17:00:53 -0400
commitf89d7cc984dd780159906dbd9f37371c057c467d (patch)
tree2ae0a5a0e70aaa5be284f3d750119df25fe9d501 /lib
parentf7bc9de981616fadffe6556c7aba938dfbe06317 (diff)
redundant imports
Diffstat (limited to 'lib')
-rw-r--r--lib/KeyRing/BuildKeyDB.hs38
1 files changed, 10 insertions, 28 deletions
diff --git a/lib/KeyRing/BuildKeyDB.hs b/lib/KeyRing/BuildKeyDB.hs
index 2074ce3..afee71a 100644
--- a/lib/KeyRing/BuildKeyDB.hs
+++ b/lib/KeyRing/BuildKeyDB.hs
@@ -11,7 +11,6 @@ module KeyRing.BuildKeyDB where
11 11
12#if defined(VERSION_memory) 12#if defined(VERSION_memory)
13import Data.ByteArray.Encoding 13import Data.ByteArray.Encoding
14import qualified Data.ByteString.Char8 as S8
15import qualified Data.ByteString as S 14import qualified Data.ByteString as S
16#elif defined(VERSION_dataenc) 15#elif defined(VERSION_dataenc)
17import qualified Codec.Binary.Base32 as Base32 16import qualified Codec.Binary.Base32 as Base32
@@ -19,7 +18,6 @@ import qualified Codec.Binary.Base64 as Base64
19#endif 18#endif
20import qualified Codec.Encryption.OpenPGP.ASCIIArmor as ASCIIArmor 19import qualified Codec.Encryption.OpenPGP.ASCIIArmor as ASCIIArmor
21import Codec.Encryption.OpenPGP.ASCIIArmor.Types 20import Codec.Encryption.OpenPGP.ASCIIArmor.Types
22import Control.Applicative (liftA2)
23import Control.Arrow (first, second) 21import Control.Arrow (first, second)
24import Control.Exception (catch) 22import Control.Exception (catch)
25import Control.Monad 23import Control.Monad
@@ -27,52 +25,37 @@ import ControlMaybe (handleIO_)
27import Data.ASN1.BinaryEncoding (DER (..)) 25import Data.ASN1.BinaryEncoding (DER (..))
28import Data.ASN1.Encoding (decodeASN1, encodeASN1) 26import Data.ASN1.Encoding (decodeASN1, encodeASN1)
29 27
30import Data.ASN1.Types (ASN1 (BitString, End, IntVal, Null, OID, Start), 28import Data.ASN1.Types (ASN1 (End, IntVal, Start), ASN1ConstructionType (Sequence), ASN1Object, fromASN1, toASN1)
31 ASN1ConstructionType (Sequence), ASN1Object, 29
32 fromASN1, toASN1) 30
33import Data.Binary 31import Data.Binary
34import Data.Bits ((.&.), (.|.)) 32import Data.Bits (testBit)
35import Data.Bits (Bits, testBit)
36import qualified Data.ByteString as S (ByteString, breakSubstring,
37 concat, drop, hGetContents,
38 hPutStr, length, null,
39 readFile, spanEnd, unpack)
40import Data.ByteString.Lazy (ByteString) 33import Data.ByteString.Lazy (ByteString)
41import qualified Data.ByteString.Lazy as L (ByteString, concat, empty, 34import qualified Data.ByteString.Lazy as L (ByteString, concat, empty,
42 fromChunks, hGetContents, 35 hGetContents,
43 null, readFile, toChunks, 36 null, toChunks,
44 toStrict, head) 37 toStrict, head)
45import Data.Char 38import Data.Char
46import Data.Function
47import Data.List 39import Data.List
48import qualified Data.Map as Map 40import qualified Data.Map as Map
49import Data.Maybe 41import Data.Maybe
50import Data.Monoid
51import Data.OpenPGP 42import Data.OpenPGP
52import Data.OpenPGP.Util (GenerateKeyParams (..), 43import Data.OpenPGP.Util (GenerateKeyParams (..), fingerprint, generateKey, pgpSign, verify)
53 decryptSecretKey, fingerprint, 44
54 generateKey, pgpSign, verify) 45
55import Data.Ord
56import Data.Text.Encoding (encodeUtf8)
57import Data.Time.Clock (UTCTime) 46import Data.Time.Clock (UTCTime)
58import Data.Time.Clock.POSIX (utcTimeToPOSIXSeconds) 47import Data.Time.Clock.POSIX (utcTimeToPOSIXSeconds)
59import System.Directory (doesFileExist) 48import System.Directory (doesFileExist)
60 49
61import System.IO.Error (isDoesNotExistError) 50import System.IO.Error (isDoesNotExistError)
62import Text.Show.Pretty as PP (ppShow)
63#if !defined(VERSION_cryptonite) 51#if !defined(VERSION_cryptonite)
64import qualified Crypto.Hash.SHA1 as SHA1 52import qualified Crypto.Hash.SHA1 as SHA1
65import qualified Crypto.Types.PubKey.ECC as ECC 53import qualified Crypto.Types.PubKey.ECC as ECC
66#else 54#else
67import qualified Crypto.Hash as Vincent
68import qualified Crypto.PubKey.ECC.Types as ECC 55import qualified Crypto.PubKey.ECC.Types as ECC
69import Data.ByteArray (convert)
70#endif 56#endif
71import qualified Codec.Compression.GZip as GZip 57import qualified Codec.Compression.GZip as GZip
72import qualified Crypto.PubKey.RSA as RSA 58import qualified Crypto.PubKey.RSA as RSA
73import qualified Data.Text as T (break, drop, dropAround,
74 length, pack, reverse, strip,
75 unpack)
76import qualified Data.X509 as X509 59import qualified Data.X509 as X509
77import System.Posix.Files (getFdStatus, getFileStatus, 60import System.Posix.Files (getFdStatus, getFileStatus,
78 modificationTime) 61 modificationTime)
@@ -91,10 +74,9 @@ import Foreign.Marshal.Array (withArray)
91import Foreign.Ptr 74import Foreign.Ptr
92import Foreign.Storable 75import Foreign.Storable
93#endif 76#endif
94import Data.IORef
95import Data.Traversable (sequenceA) 77import Data.Traversable (sequenceA)
96import qualified Data.Traversable as Traversable 78import qualified Data.Traversable as Traversable
97import System.IO (stderr,openFile,IOMode(ReadMode)) 79import System.IO (openFile, IOMode(ReadMode))
98 80
99import System.Posix.IO (fdToHandle) 81import System.Posix.IO (fdToHandle)
100#if ! MIN_VERSION_base(4,6,0) 82#if ! MIN_VERSION_base(4,6,0)