quic 0.1.17 → 0.1.18
raw patch · 8 files changed
+33/−11 lines, 8 filesdep ~bytestring
Dependency ranges changed: bytestring
Files
- ChangeLog.md +5/−0
- Network/QUIC/Client/Run.hs +6/−2
- Network/QUIC/Config.hs +6/−3
- Network/QUIC/Packet/Token.hs +0/−2
- Network/QUIC/Types/CID.hs +4/−0
- Network/QUIC/Types/Packet.hs +3/−0
- Network/QUIC/Types/Resumption.hs +6/−1
- quic.cabal +3/−3
ChangeLog.md view
@@ -1,3 +1,8 @@+## 0.1.18++- Fixing a buf of 0-RTT where unidirectionalStream waits for SH.+- Introducing ccVersion to start with Version1.+ ## 0.1.17 - Garding the new_connection_id attack.
Network/QUIC/Client/Run.hs view
@@ -45,8 +45,8 @@ verInfo = case resumptionSession resInfo of Nothing | resumptionToken resInfo == emptyToken ->- let vers = ccVersions conf- ver = head vers+ let ver = ccVersion conf+ vers = ccVersions conf in VersionInfo ver vers _ -> let ver = resumptionVersion resInfo in VersionInfo ver [ver] ex <- E.try $ runClient conf client False verInfo@@ -71,6 +71,10 @@ setToken conn $ resumptionToken $ ccResumption conf handshaker <- handshakeClient conf' conn myAuthCIDs let client = do+ -- For 0-RTT, the following variables should be initialized+ -- in advance.+ setTxMaxStreams conn $ initialMaxStreamsBidi defaultParameters+ setTxUniMaxStreams conn $ initialMaxStreamsUni defaultParameters if ccUse0RTT conf then wait0RTTReady conn else wait1RTTReady conn
Network/QUIC/Config.hs view
@@ -46,8 +46,10 @@ -- | Client configuration. data ClientConfig = ClientConfig- { ccVersions :: [Version]- -- ^ Compatible versions in the preferred order.+ { ccVersion :: Version+ -- ^ The version to start with.+ , ccVersions :: [Version]+ -- ^ Compatible versions with 'ccVersion' in the preferred order. , ccCiphers :: [Cipher] -- ^ Cipher candidates defined in TLS 1.3. , ccGroups :: [Group]@@ -83,7 +85,8 @@ defaultClientConfig :: ClientConfig defaultClientConfig = ClientConfig- { ccVersions = [Version2, Version1]+ { ccVersion = Version1+ , ccVersions = [Version2, Version1] , ccCiphers = supportedCiphers defaultSupported , ccGroups = supportedGroups defaultSupported , ccParameters = defaultParameters
Network/QUIC/Packet/Token.hs view
@@ -30,8 +30,6 @@ deriving (Generic) instance Serialise UnixTime-instance Serialise Version-instance Serialise CID instance Serialise CryptoToken isRetryToken :: CryptoToken -> Bool
Network/QUIC/Types/CID.hs view
@@ -17,7 +17,9 @@ import qualified Data.ByteString.Short as Short +import Codec.Serialise import GHC.Generics+ import Network.QUIC.Imports myCIDLength :: Int@@ -25,6 +27,8 @@ -- | A type for conneciton ID. newtype CID = CID Bytes deriving (Eq, Ord, Generic)++instance Serialise CID instance Show CID where show (CID cid) = shortToString (enc16s cid)
Network/QUIC/Types/Packet.hs view
@@ -4,6 +4,7 @@ module Network.QUIC.Types.Packet where +import Codec.Serialise import Data.Ix import GHC.Generics import Network.TLS.QUIC (ExtensionID (EID_QuicTransportParameters, ExtensionID))@@ -20,6 +21,8 @@ -- | QUIC version. newtype Version = Version Word32 deriving (Eq, Ord, Generic)++instance Serialise Version {- FOURMOLU_DISABLE -} pattern Negotiation :: Version
Network/QUIC/Types/Resumption.hs view
@@ -1,7 +1,10 @@+{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE RecordWildCards #-} module Network.QUIC.Types.Resumption where +import Codec.Serialise+import GHC.Generics import Network.TLS hiding (Version) import Network.TLS.QUIC @@ -18,7 +21,9 @@ , resumptionToken :: Token , resumptionRetry :: Bool }- deriving (Eq, Show)+ deriving (Eq, Show, Generic)++instance Serialise ResumptionInfo defaultResumptionInfo :: ResumptionInfo defaultResumptionInfo =
quic.cabal view
@@ -1,6 +1,6 @@ cabal-version: >=1.10 name: quic-version: 0.1.17+version: 0.1.18 license: BSD3 license-file: LICENSE maintainer: kazu@iij.ad.jp@@ -128,7 +128,7 @@ base >=4.9 && <5, array >= 0.5 && < 0.6, base16-bytestring >= 1.0 && < 1.1,- bytestring >= 0.10 && < 0.13,+ bytestring >= 0.10, containers >= 0.6 && < 0.7, crypto-token >= 0.1.1 && < 0.2, crypton >= 0.34 && < 0.35,@@ -141,7 +141,7 @@ fast-logger >= 3.2.2 && < 3.3, unix-time >= 0.4.12 && < 0.5, iproute >= 1.7.12 && < 1.8,- network >= 3.1.4 && < 3.2,+ network >= 3.1.4, network-byte-order >= 0.1.7 && < 0.2, network-control >= 0.0.2 && < 0.1, network-udp >= 0.0.0 && < 0.1,