diff --git a/network-conduit-tls/ChangeLog.md b/network-conduit-tls/ChangeLog.md index 20e66ef86..ef9f23937 100644 --- a/network-conduit-tls/ChangeLog.md +++ b/network-conduit-tls/ChangeLog.md @@ -1,3 +1,7 @@ +## 1.4.0.1 + +* Fix test suite for crypton-connection 0.4 [#512](https://github.com/snoyberg/conduit/issues/512) + ## 1.4.0 * Migrate to crypton diff --git a/network-conduit-tls/network-conduit-tls.cabal b/network-conduit-tls/network-conduit-tls.cabal index 7654a128b..119ee1ee9 100644 --- a/network-conduit-tls/network-conduit-tls.cabal +++ b/network-conduit-tls/network-conduit-tls.cabal @@ -1,5 +1,5 @@ name: network-conduit-tls -version: 1.4.0 +version: 1.4.0.1 synopsis: Create TLS-aware network code with conduits description: Uses the tls package for a pure-Haskell implementation. homepage: https://github.com/snoyberg/conduit @@ -42,4 +42,5 @@ test-suite test , network-conduit-tls , bytestring , HUnit + , data-default-class ghc-options: -Wall -threaded diff --git a/network-conduit-tls/test/main.hs b/network-conduit-tls/test/main.hs index 51e40fa91..ae0c4d0a9 100644 --- a/network-conduit-tls/test/main.hs +++ b/network-conduit-tls/test/main.hs @@ -1,4 +1,5 @@ {-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE CPP #-} import Test.HUnit import Data.Conduit import Data.Conduit.Network (appSource, appSink) @@ -7,6 +8,9 @@ import Control.Concurrent (forkIO, threadDelay, killThread) import qualified Network.Connection as NC import qualified Data.ByteString as BS +#if MIN_VERSION_crypton_connection(0,4,0) +import qualified Data.Default.Class +#endif testKeyRaw :: BS.ByteString testKeyRaw = "-----BEGIN RSA PRIVATE KEY-----\nMIIEpAIBAAKCAQEAwAU371YZKOVON+S/TpNERcSbe5vWk0kdodR/cC7iwQ40ukO6\nIH7H40THVAWQwlD6kasRdsxcsk+KcOpoBgivw9izJ7ggBp7reFe8mJRp2qMGyK+n89ZRHNlVWl1qSAC/o0A1ldvyfZ2X4nNYHVAFqwhPSsFTxQgxORJbL7qdKy1tirqg\nWpHQMgK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Awp+tIaPa4ZpdWiXmUSe1d4Wm6cL6WvXjJGpx\nhzTRakg1z35IRo2ABltQpmIfIQd1SjZlnl/fsc1HeeDjhXwT2wTgt2phY4B9ZN0z\nmDpDXxPhBigntnpc0N6ceXAakKj4x0xybv2Er4zlQuPQgMSGq+/IZemQDQxYhvOP\nkAyvfX0CgYBEVKvhcXQ9ETmEsk0FxPvpS9CtWXaNWItVzC/z3+mrU2B5JPcBQF72\nBsuoupeq52S+SGH7el5Xp2AoLXjZYsQ9S0t76p6G3lE/cHmnc/QNt4kT6oe5mpv1\nYXIo3/044Cbw2FEkEaj0iucagYCoqhlZTFN8aR6dXFTmvU+k6VP7pg==\n-----END RSA PRIVATE KEY-----" @@ -25,7 +29,12 @@ clientConfig :: TLSClientConfig clientConfig = tlsClientConfig 4242 "127.0.0.1" clientConfigNoCA :: TLSClientConfig -clientConfigNoCA = clientConfig {tlsClientTLSSettings = NC.TLSSettingsSimple True False False} +clientConfigNoCA = clientConfig + { tlsClientTLSSettings = NC.TLSSettingsSimple True False False +#if MIN_VERSION_crypton_connection(0,4,0) + Data.Default.Class.def +#endif + } testSimpleServerClient :: IO () testSimpleServerClient = do