packages feed

http2-tls 0.2.6 → 0.2.7

raw patch · 5 files changed

+53/−23 lines, 5 filesdep ~bytestringPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: bytestring

API changes (from Hackage documentation)

+ Network.HTTP2.TLS.Server: settingsEarlyDataSize :: Settings -> Int

Files

Network/HTTP2/TLS/Client.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-}@@ -239,7 +240,12 @@         , clientShared = shared         , clientHooks = hooks         , clientDebug = debug+#if MIN_VERSION_tls(2,0,0)         , clientUseEarlyData = settingsUseEarlyData+#else+        , clientEarlyData = Nothing+#endif+         }   where     shared =
Network/HTTP2/TLS/Client/Settings.hs view
@@ -15,16 +15,20 @@     { settingsKeyLogger :: String -> IO ()     -- ^ Key logger (TLS and H2)     ---    -- Applications may wish to set this depending on the SSLKEYLOGFILE environment variable. Default is do nothing.+    -- Applications may wish to set this depending on the SSLKEYLOGFILE environment variable.+    --+    -- Default: do nothing.     , settingsValidateCert :: Bool     -- ^ Should we validate TLS certificates? (TLS and H2)     --     -- >>> settingsValidateCert defaultSettings     -- True     , settingsCAStore :: CertificateStore-    -- ^ Certificate store used for validation. The default is 'mempty'. (TLS and H2)+    -- ^ Certificate store used for validation. (TLS and H2)+    --+    -- Default: 'mempty'.     , settingsServerNameOverride :: Maybe HostName-    -- ^ Server name override+    -- ^ Server name override (H2)     --     -- By default, the server name (for TLS SNI) is set based on the     -- 'Network.HTTP2.Client.authority', corresponding to the HTTP2@@ -59,6 +63,8 @@     -- 1048575     , settingsSessionManager :: SessionManager     -- ^ TLS session manager (H2 and TLS)+    --+    -- Default: 'noSessionManager'     , settingsWantSessionResume :: Maybe (SessionID, SessionData)     -- ^ Try to resume a TLS session (H2 and TLS)     --@@ -66,6 +72,8 @@     -- Nothing     , settingsUseEarlyData :: Bool     -- ^ Try to use 0-RTT (H2 and TLS)+    --+    -- This is only supported for @tls >= 2.0@.     --     -- >>> settingsUseEarlyData defaultSettings     -- False
Network/HTTP2/TLS/Server.hs view
@@ -25,6 +25,7 @@     settingsStreamWindowSize,     settingsSessionManager,     settingsOpenServerSocket,+    settingsEarlyDataSize,      -- * IO backend     IOBackend,@@ -86,12 +87,13 @@         (settingsOpenServerSocket settings)         (settingsTimeout settings)         (Just host)-        (show port) $ \mgr th sock -> do-        backend <- mkBackend settings sock-        E.bracket (contextNew backend params) bye $ \ctx -> do-            handshake ctx-            iobackend <- timeoutIOBackend th settings <$> tlsIOBackend ctx sock-            action mgr iobackend+        (show port)+        $ \mgr th sock -> do+            backend <- mkBackend settings sock+            E.bracket (contextNew backend params) bye $ \ctx -> do+                handshake ctx+                iobackend <- timeoutIOBackend th settings <$> tlsIOBackend ctx sock+                action mgr iobackend   where     params = getServerParams settings creds alpn @@ -108,10 +110,11 @@         settingsOpenServerSocket         settingsTimeout         (Just host)-        (show port) $ \mgr th sock -> do-        iobackend0 <- tcpIOBackend settings sock-        let iobackend = timeoutIOBackend th settings iobackend0-        run' settings server mgr iobackend+        (show port)+        $ \mgr th sock -> do+            iobackend0 <- tcpIOBackend settings sock+            let iobackend = timeoutIOBackend th settings iobackend0+            run' settings server mgr iobackend  run' :: Settings -> Server -> T.Manager -> IOBackend -> IO () run' settings0@Settings{..} server mgr IOBackend{..} =@@ -168,10 +171,11 @@         settingsOpenServerSocket         settingsTimeout         (Just host)-        (show port) $ \mgr th sock -> do-        iobackend0 <- tcpIOBackend settings0 sock-        let iobackend = timeoutIOBackend th settings0 iobackend0-        runIO' settings0 action mgr iobackend+        (show port)+        $ \mgr th sock -> do+            iobackend0 <- tcpIOBackend settings0 sock+            let iobackend = timeoutIOBackend th settings0 iobackend0+            runIO' settings0 action mgr iobackend  ---------------------------------------------------------------- @@ -186,6 +190,7 @@         , serverShared = shared         , serverHooks = hooks         , serverDebug = debug+        , serverEarlyDataSize = settingsEarlyDataSize         }   where     shared =
Network/HTTP2/TLS/Server/Settings.hs view
@@ -39,11 +39,13 @@     -- >>> settingsReadBufferLowerLimit defaultSettings     -- 2048     , settingsKeyLogger :: String -> IO ()-    -- ^ Key logger (defaults to none)+    -- ^ Key logger.     --     -- Applications may wish to set this depending on the SSLKEYLOGFILE environment variable. The default is do nothing.+    --+    -- Default: do nothing     , settingsNumberOfWorkers :: Int-    -- ^ The number of workers (H2 and H2c)+    -- ^ The number of workers. (H2 and H2c)     --     -- >>> settingsNumberOfWorkers defaultSettings     -- 8@@ -64,10 +66,18 @@     -- 1048575     , settingsSessionManager :: SessionManager     -- ^ TLS session manager (H2 and TLS)+    --+    -- Default: 'noSessionManager'     , settingsOpenServerSocket :: AddrInfo -> IO Socket-    -- ^ Function to initialize the server socket+    -- ^ Function to initialize the server socket (All)     ---    -- Defaults to 'openServerSocket'+    -- Default: 'openServerSocket'+    , settingsEarlyDataSize :: Int+    -- ^ The max size of early data (0-RTT) to be accepted. (H2 and TLS)+    -- 0 means that early data is not accepted.+    --+    -- >>> settingsEarlyDataSize defaultSettings+    -- 0     }  -- | Default settings.@@ -86,4 +96,5 @@         , settingsConnectionWindowSize = defaultMaxData         , settingsSessionManager = noSessionManager         , settingsOpenServerSocket = openServerSocket+        , settingsEarlyDataSize = 0         }
http2-tls.cabal view
@@ -1,6 +1,6 @@ cabal-version: >=1.10 name:          http2-tls-version:       0.2.6+version:       0.2.7 license:       BSD3 license-file:  LICENSE maintainer:    Kazu Yamamoto <kazu@iij.ad.jp>@@ -36,7 +36,7 @@     ghc-options:        -Wall     build-depends:         base >=4.9 && <5,-        bytestring >= 0.10 && < 0.13,+        bytestring >= 0.10,         http2 >=5.1 && < 5.2,         data-default-class >= 0.1 && < 0.2,         network >= 3.1.4,