summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--KeyRing.hs11
1 files changed, 3 insertions, 8 deletions
diff --git a/KeyRing.hs b/KeyRing.hs
index b87b76c..377e6e2 100644
--- a/KeyRing.hs
+++ b/KeyRing.hs
@@ -108,7 +108,7 @@ import Data.ASN1.Types ( toASN1, ASN1Object, fromASN1
108import Data.ASN1.BitArray ( BitArray(..), toBitArray ) 108import Data.ASN1.BitArray ( BitArray(..), toBitArray )
109import Data.ASN1.Encoding ( encodeASN1, encodeASN1', decodeASN1, decodeASN1' ) 109import Data.ASN1.Encoding ( encodeASN1, encodeASN1', decodeASN1, decodeASN1' )
110import Data.ASN1.BinaryEncoding ( DER(..) ) 110import Data.ASN1.BinaryEncoding ( DER(..) )
111import Data.Time.Clock.POSIX ( getPOSIXTime, POSIXTime ) 111import Data.Time.Clock.POSIX ( POSIXTime )
112import Data.Bits ( Bits ) 112import Data.Bits ( Bits )
113import Data.Text.Encoding ( encodeUtf8 ) 113import Data.Text.Encoding ( encodeUtf8 )
114import qualified Data.Map as Map 114import qualified Data.Map as Map
@@ -150,6 +150,8 @@ import qualified Data.ByteString.Lazy.Char8 as Char8
150 150
151 151
152 152
153import TimeUtil
154import PEM
153import qualified Hosts 155import qualified Hosts
154import qualified CryptoCoins 156import qualified CryptoCoins
155import Base58 157import Base58
@@ -1417,10 +1419,6 @@ readKeyFromFile False "PEM" fname = do
1417 } 1419 }
1418readKeyFromFile is_public fmt filename = error ("unimplemented key type: "++fmt) 1420readKeyFromFile is_public fmt filename = error ("unimplemented key type: "++fmt)
1419 1421
1420data PEMBlob = PEMBlob { pemType :: ByteString
1421 , pemBlob :: ByteString
1422 }
1423
1424extractPEM :: ByteString -> ByteString -> Maybe ByteString 1422extractPEM :: ByteString -> ByteString -> Maybe ByteString
1425extractPEM typ pem = if L.null blob then Nothing else Just blob 1423extractPEM typ pem = if L.null blob then Nothing else Just blob
1426 where 1424 where
@@ -2460,9 +2458,6 @@ readPacketsFromFile ctx fname = do
2460 return $ decode input 2458 return $ decode input
2461#endif 2459#endif
2462 2460
2463now :: IO Integer
2464now = floor <$> Data.Time.Clock.POSIX.getPOSIXTime
2465
2466signature_time :: SignatureOver -> Word32 2461signature_time :: SignatureOver -> Word32
2467signature_time ov = case if null cs then ds else cs of 2462signature_time ov = case if null cs then ds else cs of
2468 [] -> minBound 2463 [] -> minBound