on master help sign in
Compatible with tls 1.3 #390
commiteaa7eec1582dfbb6fb8a2712c118f138c8404de8 authorMichael Snoyman <michael@snoyman.com> dateSun 21 Jun 2015, 06:47 (11 years ago) parent4842250
3 files changed+10−1
warp-tls/ChangeLog.md+4 warp-tls/Network/Wai/Handler/WarpTLS.hs+5 warp-tls/warp-tls.cabal+1−1
warp-tls/ChangeLog.md+4
@@ -1,3 +1,7 @@
1+## 3.0.4.2
2+
3+* tls 1.3 support [#390](https://github.com/yesodweb/wai/issues/390)
4+
15## 3.0.4.1
26
37* Fix for leaked FDs [#378](https://github.com/yesodweb/wai/issues/378)
warp-tls/Network/Wai/Handler/WarpTLS.hs+5
@@ -1,3 +1,4 @@
1+{-# LANGUAGE CPP #-}
12{-# LANGUAGE OverloadedStrings #-}
23{-# LANGUAGE RankNTypes #-}
34{-# LANGUAGE RecordWildCards #-}
@@ -266,8 +267,12 @@ mkConn tlsset s params = do
266267
267268httpOverTls :: TLS.TLSParams params => TLSSettings -> Socket -> I.IORef B.ByteString -> params -> IO (Connection, Transport)
268269httpOverTls TLSSettings{..} s cachedRef params = do
270+#if MIN_VERSION_tls(1,3,0)
271+ ctx <- TLS.contextNew backend params
272+#else
269273 gen <- Crypto.Random.AESCtr.makeSystem
270274 ctx <- TLS.contextNew backend params gen
275+#endif
271276 TLS.contextHookSetLogging ctx tlsLogging
272277 TLS.handshake ctx
273278 readBuf <- allocateBuffer bufferSize
warp-tls/warp-tls.cabal+1−1
@@ -1,5 +1,5 @@
11Name: warp-tls
2−Version: 3.0.4.1
2+Version: 3.0.4.2
33Synopsis: HTTP over SSL/TLS support for Warp via the TLS package
44License: MIT
55License-file: LICENSE