forked from quic-go/quic-go
treat the connection ID as a big endian value
This commit is contained in:
@@ -42,7 +42,7 @@ func deriveKeys(forwardSecure bool, sharedSecret, nonces []byte, connID protocol
|
||||
} else {
|
||||
info.Write([]byte("QUIC key expansion\x00"))
|
||||
}
|
||||
utils.LittleEndian.WriteUint64(&info, uint64(connID))
|
||||
utils.BigEndian.WriteUint64(&info, uint64(connID))
|
||||
info.Write(chlo)
|
||||
info.Write(scfg)
|
||||
info.Write(cert)
|
||||
|
||||
@@ -92,7 +92,7 @@ var _ = Describe("QUIC Crypto Key Derivation", func() {
|
||||
false,
|
||||
[]byte("0123456789012345678901"),
|
||||
[]byte("nonce"),
|
||||
protocol.ConnectionID(42),
|
||||
protocol.ConnectionID(0x2a00000000000000), // this was 42 before the connection ID was changed to big endian
|
||||
[]byte("chlo"),
|
||||
[]byte("scfg"),
|
||||
[]byte("cert"),
|
||||
@@ -142,7 +142,7 @@ var _ = Describe("QUIC Crypto Key Derivation", func() {
|
||||
false,
|
||||
[]byte("0123456789012345678901"),
|
||||
[]byte("nonce"),
|
||||
protocol.ConnectionID(42),
|
||||
protocol.ConnectionID(0x2a00000000000000), // this was 42 before the connection ID was changed to big endian
|
||||
[]byte("chlo"),
|
||||
[]byte("scfg"),
|
||||
[]byte("cert"),
|
||||
@@ -161,7 +161,7 @@ var _ = Describe("QUIC Crypto Key Derivation", func() {
|
||||
true,
|
||||
[]byte("0123456789012345678901"),
|
||||
[]byte("nonce"),
|
||||
protocol.ConnectionID(42),
|
||||
protocol.ConnectionID(0x2a00000000000000), // this was 42 before the connection ID was changed to big endian
|
||||
[]byte("chlo"),
|
||||
[]byte("scfg"),
|
||||
[]byte("cert"),
|
||||
@@ -180,7 +180,7 @@ var _ = Describe("QUIC Crypto Key Derivation", func() {
|
||||
true,
|
||||
[]byte("0123456789012345678901"),
|
||||
[]byte("nonce"),
|
||||
protocol.ConnectionID(42),
|
||||
protocol.ConnectionID(0x2a00000000000000), // this was 42 before the connection ID was changed to big endian
|
||||
[]byte("chlo"),
|
||||
[]byte("scfg"),
|
||||
[]byte("cert"),
|
||||
|
||||
Reference in New Issue
Block a user