packages feed

quic 0.2.10 → 0.2.11

raw patch · 7 files changed

+28/−18 lines, 7 filesdep −data-default

Dependencies removed: data-default

Files

ChangeLog.md view
@@ -1,5 +1,12 @@ # ChangeLog +## 0.2.11++* `ConnectionIsClosed` now takes reason.+* `ConnectionClose NoError` is treated as an error if level is not RTT1.+* Defining `ccServerNameOverride`.+* Removing data-default.+ ## 0.2.10  * Fix a bug of ACK on retransmission.
Network/QUIC/Client.hs view
@@ -7,6 +7,7 @@     ClientConfig,     defaultClientConfig,     ccServerName,+    ccServerNameOverride,     ccPortName,     ccALPN,     ccUse0RTT,
Network/QUIC/Config.hs view
@@ -3,7 +3,6 @@  module Network.QUIC.Config where -import Data.Default import Data.IP import Network.Socket import Network.TLS hiding (@@ -104,6 +103,8 @@     -- called when network events are observed.     --     -- Default: 'False'+    , ccServerNameOverride :: Maybe HostName+    -- ^ Used to specify SNI for TLS intead of `ccServerName`.     }  -- | The default value for client configuration.@@ -119,7 +120,7 @@         , ccQLog = Nothing         , ccCredentials = mempty         , ccHooks = defaultHooks-        , ccTlsHooks = def+        , ccTlsHooks = defaultClientHooks         , ccUse0RTT = False         , -- client original           ccServerName = "127.0.0.1"@@ -131,6 +132,7 @@         , ccDebugLog = False         , ccSockConnected = False         , ccWatchDog = False+        , ccServerNameOverride = Nothing         }  ----------------------------------------------------------------@@ -178,7 +180,7 @@         , scQLog = Nothing         , scCredentials = mempty         , scHooks = defaultHooks-        , scTlsHooks = def+        , scTlsHooks = defaultServerHooks         , scUse0RTT = False         , -- server original           scAddresses = [("0.0.0.0", 4433), ("::", 4433)]
Network/QUIC/Receiver.hs view
@@ -447,8 +447,8 @@ processFrame conn RTT1Level (PathResponse dat) =     -- RTT0Level falls intentionally     checkResponse conn dat-processFrame conn _lvl (ConnectionClose NoError _ftyp _reason) =-    when (isServer conn) $ E.throwIO ConnectionIsClosed+processFrame conn lvl (ConnectionClose NoError _ftyp reason) =+    when (isServer conn || lvl /= RTT1Level) $ E.throwIO $ ConnectionIsClosed reason processFrame _conn _lvl (ConnectionClose err _ftyp reason) = do     let quicexc = TransportErrorIsReceived err reason     E.throwIO quicexc
Network/QUIC/TLS.hs view
@@ -6,13 +6,12 @@     serverHandshaker, ) where -import Control.Applicative ((<|>))-import Data.Default import Network.TLS hiding (Version, defaultSupported) import Network.TLS.QUIC import System.X509  import Network.QUIC.Config+import Network.QUIC.Imports import Network.QUIC.Parameters import Network.QUIC.Types @@ -31,8 +30,9 @@     caStore <- if ccValidate then getSystemCertificateStore else return mempty     tlsQUICClient (cparams caStore) callbacks   where+    sni = fromMaybe ccServerName ccServerNameOverride     cparams caStore =-        (defaultParamsClient ccServerName "")+        (defaultParamsClient sni "")             { clientShared = cshared caStore             , clientHooks = hook             , clientSupported = supported@@ -45,8 +45,9 @@     convExt = onTLSExtensionCreated ccHooks     skipValidation = ValidationCache (\_ _ _ -> return ValidationCachePass) (\_ _ _ -> return ())     cshared caStore =-        def-            { sharedValidationCache = if ccValidate then def else skipValidation+        defaultShared+            { sharedValidationCache =+                if ccValidate then sharedValidationCache defaultShared else skipValidation             , sharedCAStore = caStore             , sharedHelloExtensions = convExt $ parametersToExtensionRaw ver params             , sharedSessionManager = sessionManager establish@@ -61,7 +62,7 @@             , supportedGroups = ccGroups             }     debug =-        def+        defaultDebugParams             { debugKeyLogger = ccKeyLog             } @@ -81,7 +82,7 @@     tlsQUICServer sparams callbacks   where     sparams =-        def+        defaultParamsServer             { serverShared = sshared             , serverHooks = hook             , serverSupported = supported@@ -92,7 +93,7 @@     convTP = onTransportParametersCreated scHooks     convExt = onTLSExtensionCreated scHooks     sshared =-        def+        defaultShared             { sharedCredentials = scCredentials             , sharedSessionManager = scSessionManager             }@@ -108,12 +109,12 @@                 return $ exts ++ exts0'             }     supported =-        def+        defaultSupported             { supportedVersions = [TLS13]             , supportedCiphers = scCiphers             , supportedGroups = scGroups             }     debug =-        def+        defaultDebugParams             { debugKeyLogger = scKeyLog             }
Network/QUIC/Types/Exception.hs view
@@ -10,7 +10,7 @@  -- | User level exceptions for QUIC. data QUICException-    = ConnectionIsClosed -- NoError+    = ConnectionIsClosed ReasonPhrase     | TransportErrorIsReceived TransportError ReasonPhrase     | TransportErrorIsSent TransportError ReasonPhrase     | ApplicationProtocolErrorIsReceived ApplicationProtocolError ReasonPhrase
quic.cabal view
@@ -1,6 +1,6 @@ cabal-version:      >=1.10 name:               quic-version:            0.2.10+version:            0.2.11 license:            BSD3 license-file:       LICENSE maintainer:         kazu@iij.ad.jp@@ -138,7 +138,6 @@         crypton >=0.34,         crypton-x509 >=1.7.6 && <1.8,         crypton-x509-system >=1.6.7 && <1.7,-        data-default,         fast-logger >=3.2.2 && <3.3,         filepath,         iproute >=1.7.12 && <1.8,