summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Dessaux2011-11-03 18:52:20 +0100
committerJulien Dessaux2011-11-03 18:52:20 +0100
commit7840059d8d31a4142ee5c667bca19501c6d2e279 (patch)
tree44444cab31eef5f5853badfb194cabddcc0b9588
parentFixed a bug in the quote module (diff)
downloadhsbot-7840059d8d31a4142ee5c667bca19501c6d2e279.tar.gz
hsbot-7840059d8d31a4142ee5c667bca19501c6d2e279.tar.bz2
hsbot-7840059d8d31a4142ee5c667bca19501c6d2e279.zip
Taking advantage of the new TLS debugging capabilities
-rw-r--r--Hsbot/Config.hs3
-rw-r--r--Hsbot/Types.hs3
-rw-r--r--Hsbot/Utils.hs4
3 files changed, 7 insertions, 3 deletions
diff --git a/Hsbot/Config.hs b/Hsbot/Config.hs
index 6053e9e..b8dad68 100644
--- a/Hsbot/Config.hs
+++ b/Hsbot/Config.hs
@@ -33,7 +33,8 @@ defaultTLSConfig = TLSConfig
, cipher_AES256_SHA1
, cipher_AES128_SHA256
, cipher_AES256_SHA256 ]
- , sslVerify = True }
+ , sslVerify = True
+ , sslLogging = defaultLogging }
noSSL :: TLSConfig
noSSL = defaultTLSConfig { sslOn = False }
diff --git a/Hsbot/Types.hs b/Hsbot/Types.hs
index b0110c2..3201caf 100644
--- a/Hsbot/Types.hs
+++ b/Hsbot/Types.hs
@@ -93,5 +93,6 @@ data TLSConfig = TLSConfig
, sslVersions :: [Network.TLS.Version]
, sslCiphers :: [Network.TLS.Cipher]
, sslVerify :: Bool
- } deriving (Show)
+ , sslLogging :: TLSLogging
+ }
diff --git a/Hsbot/Utils.hs b/Hsbot/Utils.hs
index d29345c..93bb64d 100644
--- a/Hsbot/Utils.hs
+++ b/Hsbot/Utils.hs
@@ -64,6 +64,8 @@ initTLSEnv :: TLSConfig -> IO TLSParams
initTLSEnv ssl = do
let versions = sslVersions ssl
ciphers = sslCiphers ssl
+ logging = sslLogging ssl
return $ defaultParams { pAllowedVersions = versions
- , pCiphers = ciphers }
+ , pCiphers = ciphers
+ , pLogging = logging }