packages feed

warp-tls 3.2.2 → 3.2.3

raw patch · 2 files changed

+13/−12 lines, 2 filesdep ~warp

Dependency ranges changed: warp

Files

Network/Wai/Handler/WarpTLS.hs view
@@ -55,7 +55,7 @@ import qualified Data.IORef as I import Data.Streaming.Network (bindPortTCP, safeRecv) import Data.Typeable (Typeable)-import Network.Socket (Socket, sClose, withSocketsDo, SockAddr, accept)+import Network.Socket (Socket, close, withSocketsDo, SockAddr, accept) import Network.Socket.ByteString (sendAll) import qualified Network.TLS as TLS import qualified Crypto.PubKey.DH as DH@@ -234,7 +234,7 @@ runTLS tset set app = withSocketsDo $     bracket         (bindPortTCP (getPort set) (getHost set))-        sClose+        close         (\sock -> runTLSSocket tset set sock app)  ----------------------------------------------------------------@@ -309,7 +309,7 @@     return (mkConn tlsset s params, sa)  mkConn :: TLS.TLSParams params => TLSSettings -> Socket -> params -> IO (Connection, Transport)-mkConn tlsset s params = switch `onException` sClose s+mkConn tlsset s params = switch `onException` close s   where     switch = do         firstBS <- safeRecv s 4096@@ -334,7 +334,7 @@   where     backend recvN = TLS.Backend {         TLS.backendFlush = return ()-      , TLS.backendClose = sClose s+      , TLS.backendClose = close s       , TLS.backendSend  = sendAll' s       , TLS.backendRecv  = recvN       }@@ -344,7 +344,8 @@         connSendMany         = TLS.sendData ctx . L.fromChunks       , connSendAll          = sendall       , connSendFile         = sendfile-      , connClose            = close+      , connClose            = close'+      , connFree             = freeBuffer writeBuf       , connRecv             = recv ref       , connRecvBuf          = recvBuf ref       , connWriteBuffer      = writeBuf@@ -355,9 +356,8 @@         sendfile fid offset len hook headers =             readSendFile writeBuf bufferSize sendall fid offset len hook headers -        close = freeBuffer writeBuf `finally`-                void (tryIO $ TLS.bye ctx) `finally`-                TLS.contextClose ctx+        close' = void (tryIO $ TLS.bye ctx) `finally`+                 TLS.contextClose ctx          -- TLS version of recv with a cache for leftover input data.         -- The cache is shared with recvBuf.@@ -463,7 +463,7 @@         \r\nConnection: Upgrade\         \r\nContent-Type: text/plain\r\n\r\n"         mapM_ (sendAll s) $ L.toChunks lbs-        sClose s+        close s         throwIO InsecureConnectionDenied  ----------------------------------------------------------------
warp-tls.cabal view
@@ -1,5 +1,5 @@ Name:                warp-tls-Version:             3.2.2+Version:             3.2.3 Synopsis:            HTTP over TLS support for Warp via the TLS package License:             MIT License-file:        LICENSE@@ -10,7 +10,8 @@ Build-Type:          Simple Cabal-Version:       >=1.6 Stability:           Stable-description:         Support for SSL is now obsoleted.+description:         SSLv1 and SSLv2 are obsoleted by IETF.+                     We should use TLS 1.2 (or TLS 1.1 or TLS 1.0 if necessary).                      HTTP/2 can be negotiated by ALPN.                      API docs and the README are available at                      <http://www.stackage.org/package/warp-tls>.@@ -20,7 +21,7 @@   Build-Depends:     base                          >= 4        && < 5                    , bytestring                    >= 0.9                    , wai                           >= 3.2      && < 3.3-                   , warp                          >= 3.2      && < 3.3+                   , warp                          >= 3.2.10   && < 3.3                    , data-default-class            >= 0.0.1                    , tls                           >= 1.3.5                    , cryptonite                    >= 0.12