forked from quic-go/quic-go
remove the OmitConnectionID field from the Header struct
Instead, just look at the length of the destination connection ID.
This commit is contained in:
@@ -165,16 +165,16 @@ var _ = Describe("Packet packer", func() {
|
||||
|
||||
It("it omits the connection ID for forward-secure packets", func() {
|
||||
ph := packer.getHeader(protocol.EncryptionForwardSecure)
|
||||
Expect(ph.OmitConnectionID).To(BeFalse())
|
||||
Expect(ph.DestConnectionID.Len()).ToNot(BeZero())
|
||||
packer.SetOmitConnectionID()
|
||||
ph = packer.getHeader(protocol.EncryptionForwardSecure)
|
||||
Expect(ph.OmitConnectionID).To(BeTrue())
|
||||
Expect(ph.DestConnectionID.Len()).To(BeZero())
|
||||
})
|
||||
|
||||
It("doesn't omit the connection ID for non-forward-secure packets", func() {
|
||||
packer.SetOmitConnectionID()
|
||||
ph := packer.getHeader(protocol.EncryptionSecure)
|
||||
Expect(ph.OmitConnectionID).To(BeFalse())
|
||||
Expect(ph.DestConnectionID.Len()).ToNot(BeZero())
|
||||
})
|
||||
|
||||
It("adds the Version Flag to the Public Header before the crypto handshake is finished", func() {
|
||||
@@ -254,20 +254,6 @@ var _ = Describe("Packet packer", func() {
|
||||
Expect(h.IsLongHeader).To(BeFalse())
|
||||
Expect(h.PacketNumberLen).To(BeNumerically(">", 0))
|
||||
})
|
||||
|
||||
It("it omits the connection ID for forward-secure packets", func() {
|
||||
h := packer.getHeader(protocol.EncryptionForwardSecure)
|
||||
Expect(h.OmitConnectionID).To(BeFalse())
|
||||
packer.SetOmitConnectionID()
|
||||
h = packer.getHeader(protocol.EncryptionForwardSecure)
|
||||
Expect(h.OmitConnectionID).To(BeTrue())
|
||||
})
|
||||
|
||||
It("doesn't omit the connection ID for non-forward-secure packets", func() {
|
||||
packer.SetOmitConnectionID()
|
||||
h := packer.getHeader(protocol.EncryptionSecure)
|
||||
Expect(h.OmitConnectionID).To(BeFalse())
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user