diff options
Diffstat (limited to 'KeyRing.hs')
-rw-r--r-- | KeyRing.hs | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -145,8 +145,13 @@ import qualified Data.Text as T ( Text, unpack, pack, | |||
145 | import qualified System.Posix.Types as Posix | 145 | import qualified System.Posix.Types as Posix |
146 | import System.Posix.Files ( modificationTime, getFileStatus, getFdStatus | 146 | import System.Posix.Files ( modificationTime, getFileStatus, getFdStatus |
147 | , setFileCreationMask, setFileTimes ) | 147 | , setFileCreationMask, setFileTimes ) |
148 | #if MIN_VERSION_x509(1,5,0) | ||
149 | import Data.Hourglass.Types | ||
150 | import Data.Hourglass | ||
151 | #endif | ||
148 | #if MIN_VERSION_unix(2,7,0) | 152 | #if MIN_VERSION_unix(2,7,0) |
149 | import System.Posix.Files ( setFdTimesHiRes ) | 153 | import System.Posix.Files ( setFdTimesHiRes ) |
154 | import Foreign.C.Types ( CTime(..), CLong, CInt(..) ) | ||
150 | #else | 155 | #else |
151 | import Foreign.C.Types ( CTime(..), CLong, CInt(..) ) | 156 | import Foreign.C.Types ( CTime(..), CLong, CInt(..) ) |
152 | import Foreign.Marshal.Array ( withArray ) | 157 | import 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 = |