Updated for TLS 0.6
This commit is contained in:
parent
5d2c3cdeb2
commit
2ff4db03bb
2 changed files with 6 additions and 4 deletions
|
@ -7,6 +7,7 @@ module Hsbot.Core
|
||||||
import Control.Concurrent
|
import Control.Concurrent
|
||||||
import Control.Exception (IOException, catch)
|
import Control.Exception (IOException, catch)
|
||||||
import Control.Monad.Reader
|
import Control.Monad.Reader
|
||||||
|
import Crypto.Random
|
||||||
import qualified Data.ByteString.Char8 as C
|
import qualified Data.ByteString.Char8 as C
|
||||||
import qualified Data.ByteString.Lazy as L
|
import qualified Data.ByteString.Lazy as L
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
|
@ -38,7 +39,7 @@ initHsbot config = do
|
||||||
then (do
|
then (do
|
||||||
infoM "Hsbot.Core" "TLS init"
|
infoM "Hsbot.Core" "TLS init"
|
||||||
tlsenv <- initTLSEnv (configTLS config)
|
tlsenv <- initTLSEnv (configTLS config)
|
||||||
randomGen <- makeSRandomGen >>= either (fail . show) (return . id)
|
randomGen <- newGenIO :: IO SystemRandom
|
||||||
sCtx <- client tlsenv randomGen connhdl
|
sCtx <- client tlsenv randomGen connhdl
|
||||||
handshake sCtx
|
handshake sCtx
|
||||||
return (Just tlsenv, Just sCtx))
|
return (Just tlsenv, Just sCtx))
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Name: hsbot
|
Name: hsbot
|
||||||
Version: 0.4.5
|
Version: 0.4.6
|
||||||
Cabal-version: >=1.2
|
Cabal-version: >=1.2
|
||||||
Synopsis: A multipurposes IRC bot
|
Synopsis: A multipurposes IRC bot
|
||||||
Description:
|
Description:
|
||||||
|
@ -31,14 +31,15 @@ Library
|
||||||
bytestring,
|
bytestring,
|
||||||
certificate,
|
certificate,
|
||||||
containers,
|
containers,
|
||||||
|
crypto-api,
|
||||||
cryptocipher,
|
cryptocipher,
|
||||||
dyre,
|
dyre,
|
||||||
hslogger,
|
hslogger,
|
||||||
irc,
|
irc,
|
||||||
mtl,
|
mtl,
|
||||||
network,
|
network,
|
||||||
tls >= 0.5.1,
|
tls >= 0.6.1,
|
||||||
tls-extra >= 0.1.2
|
tls-extra >= 0.2.0
|
||||||
|
|
||||||
|
|
||||||
Executable hsbot
|
Executable hsbot
|
||||||
|
|
Reference in a new issue