summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Dessaux2011-05-05 00:28:08 +0200
committerJulien Dessaux2011-05-05 00:28:08 +0200
commit2ff4db03bbe41001322ea27f74997a813ded6a1f (patch)
tree473fd0d0949fc311aa58d7f354c83d0306fbe2d6
parentChanged the way I handled the Bot monad for more concurrency. (diff)
downloadhsbot-2ff4db03bbe41001322ea27f74997a813ded6a1f.tar.gz
hsbot-2ff4db03bbe41001322ea27f74997a813ded6a1f.tar.bz2
hsbot-2ff4db03bbe41001322ea27f74997a813ded6a1f.zip
Updated for TLS 0.6
-rw-r--r--Hsbot/Core.hs3
-rw-r--r--hsbot.cabal7
2 files changed, 6 insertions, 4 deletions
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))
diff --git a/hsbot.cabal b/hsbot.cabal
index 661b339..8470339 100644
--- a/hsbot.cabal
+++ b/hsbot.cabal
@@ -1,5 +1,5 @@
Name: hsbot
-Version: 0.4.5
+Version: 0.4.6
Cabal-version: >=1.2
Synopsis: A multipurposes IRC bot
Description:
@@ -31,14 +31,15 @@ Library
bytestring,
certificate,
containers,
+ crypto-api,
cryptocipher,
dyre,
hslogger,
irc,
mtl,
network,
- tls >= 0.5.1,
- tls-extra >= 0.1.2
+ tls >= 0.6.1,
+ tls-extra >= 0.2.0
Executable hsbot