diff --git a/pontarius-xmpp.cabal b/pontarius-xmpp.cabal index 0f8e883..b775eb5 100644 --- a/pontarius-xmpp.cabal +++ b/pontarius-xmpp.cabal @@ -31,13 +31,14 @@ Library , resourcet >=0.3.0 , containers >=0.4.0.0 , random >=1.0.0.0 - , tls >=1.0.0 + , tls >=1.1.0 , tls-extra >=0.5.0 , pureMD5 >=2.1.2.1 , base64-bytestring >=0.1.0.0 , binary >=0.4.1 , attoparsec >=0.10.0.3 , crypto-api >=0.9 + , crypto-random-api >=0.2 , cryptohash >=0.6.1 , text >=0.11.1.5 , bytestring >=0.9.1.9 diff --git a/source/Data/Conduit/Tls.hs b/source/Data/Conduit/Tls.hs index 17e4d19..0842ae5 100644 --- a/source/Data/Conduit/Tls.hs +++ b/source/Data/Conduit/Tls.hs @@ -21,6 +21,7 @@ import qualified Data.Conduit.Binary as CB import Data.IORef import Network.TLS as TLS +import Crypto.Random.API import Network.TLS.Extra as TLSExtra import System.IO (Handle) @@ -42,7 +43,7 @@ tlsinit :: (MonadIO m, MonadIO m1) => ) tlsinit debug tlsParams backend = do when debug . liftIO $ putStrLn "TLS with debug mode enabled" - gen <- liftIO $ (newGenIO :: IO SystemRandom) -- TODO: Find better random source? + gen <- liftIO $ getSystemRandomGen -- TODO: Find better random source? con <- client tlsParams gen backend handshake con let src = forever $ do