From 2ff4db03bbe41001322ea27f74997a813ded6a1f Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Thu, 5 May 2011 00:28:08 +0200 Subject: Updated for TLS 0.6 --- Hsbot/Core.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Hsbot') diff --git a/Hsbot/Core.hs b/Hsbot/Core.hs index f1659e9..4e79c76 100644 --- a/Hsbot/Core.hs +++ b/Hsbot/Core.hs @@ -7,6 +7,7 @@ module Hsbot.Core import Control.Concurrent import Control.Exception (IOException, catch) import Control.Monad.Reader +import Crypto.Random import qualified Data.ByteString.Char8 as C import qualified Data.ByteString.Lazy as L import qualified Data.Map as M @@ -38,7 +39,7 @@ initHsbot config = do then (do infoM "Hsbot.Core" "TLS init" tlsenv <- initTLSEnv (configTLS config) - randomGen <- makeSRandomGen >>= either (fail . show) (return . id) + randomGen <- newGenIO :: IO SystemRandom sCtx <- client tlsenv randomGen connhdl handshake sCtx return (Just tlsenv, Just sCtx)) -- cgit v1.2.3