Browse Source

Conform to tls-1.1

master
Jon Kristensen 13 years ago
parent
commit
7c1816b225
  1. 3
      pontarius-xmpp.cabal
  2. 3
      source/Data/Conduit/Tls.hs

3
pontarius-xmpp.cabal

@ -31,13 +31,14 @@ Library
, resourcet >=0.3.0 , resourcet >=0.3.0
, containers >=0.4.0.0 , containers >=0.4.0.0
, random >=1.0.0.0 , random >=1.0.0.0
, tls >=1.0.0 , tls >=1.1.0
, tls-extra >=0.5.0 , tls-extra >=0.5.0
, pureMD5 >=2.1.2.1 , pureMD5 >=2.1.2.1
, base64-bytestring >=0.1.0.0 , base64-bytestring >=0.1.0.0
, binary >=0.4.1 , binary >=0.4.1
, attoparsec >=0.10.0.3 , attoparsec >=0.10.0.3
, crypto-api >=0.9 , crypto-api >=0.9
, crypto-random-api >=0.2
, cryptohash >=0.6.1 , cryptohash >=0.6.1
, text >=0.11.1.5 , text >=0.11.1.5
, bytestring >=0.9.1.9 , bytestring >=0.9.1.9

3
source/Data/Conduit/Tls.hs

@ -21,6 +21,7 @@ import qualified Data.Conduit.Binary as CB
import Data.IORef import Data.IORef
import Network.TLS as TLS import Network.TLS as TLS
import Crypto.Random.API
import Network.TLS.Extra as TLSExtra import Network.TLS.Extra as TLSExtra
import System.IO (Handle) import System.IO (Handle)
@ -42,7 +43,7 @@ tlsinit :: (MonadIO m, MonadIO m1) =>
) )
tlsinit debug tlsParams backend = do tlsinit debug tlsParams backend = do
when debug . liftIO $ putStrLn "TLS with debug mode enabled" 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 con <- client tlsParams gen backend
handshake con handshake con
let src = forever $ do let src = forever $ do

Loading…
Cancel
Save