summaryrefslogtreecommitdiff
path: root/KeyRing.hs
diff options
context:
space:
mode:
Diffstat (limited to 'KeyRing.hs')
-rw-r--r--KeyRing.hs9
1 files changed, 8 insertions, 1 deletions
diff --git a/KeyRing.hs b/KeyRing.hs
index 857c755..2deb12b 100644
--- a/KeyRing.hs
+++ b/KeyRing.hs
@@ -145,8 +145,13 @@ import qualified Data.Text as T ( Text, unpack, pack,
145import qualified System.Posix.Types as Posix 145import qualified System.Posix.Types as Posix
146import System.Posix.Files ( modificationTime, getFileStatus, getFdStatus 146import System.Posix.Files ( modificationTime, getFileStatus, getFdStatus
147 , setFileCreationMask, setFileTimes ) 147 , setFileCreationMask, setFileTimes )
148#if MIN_VERSION_x509(1,5,0)
149import Data.Hourglass.Types
150import Data.Hourglass
151#endif
148#if MIN_VERSION_unix(2,7,0) 152#if MIN_VERSION_unix(2,7,0)
149import System.Posix.Files ( setFdTimesHiRes ) 153import System.Posix.Files ( setFdTimesHiRes )
154import Foreign.C.Types ( CTime(..), CLong, CInt(..) )
150#else 155#else
151import Foreign.C.Types ( CTime(..), CLong, CInt(..) ) 156import Foreign.C.Types ( CTime(..), CLong, CInt(..) )
152import Foreign.Marshal.Array ( withArray ) 157import Foreign.Marshal.Array ( withArray )
@@ -1472,7 +1477,9 @@ parseCertBlob comp bs = do
1472 let asn1' = drop 2 asn1 1477 let asn1' = drop 2 asn1
1473 cert <- either (const Nothing) (Just . fst) (fromASN1 asn1') 1478 cert <- either (const Nothing) (Just . fst) (fromASN1 asn1')
1474 let _ = cert :: X509.Certificate 1479 let _ = cert :: X509.Certificate
1475 (notBefore,_) = X509.certValidity cert 1480 notBefore :: UTCTime
1481 notBefore = toUTC ( timeFromElapsedP (timeGetElapsedP vincentTime) :: CTime) -- nanoToUTCTime nano
1482 where (vincentTime,_) = X509.certValidity cert
1476 case X509.certPubKey cert of 1483 case X509.certPubKey cert of
1477 X509.PubKeyRSA key -> do 1484 X509.PubKeyRSA key -> do
1478 let withoutkey = 1485 let withoutkey =