forked from quic-go/quic-go
send connection parameters in CHLO
This commit is contained in:
@@ -120,7 +120,8 @@ var _ = Describe("Crypto setup", func() {
|
||||
|
||||
stream = &mockStream{}
|
||||
certManager = &mockCertManager{}
|
||||
csInt, err := NewCryptoSetupClient("hostname", 0, protocol.Version36, stream)
|
||||
version := protocol.Version36
|
||||
csInt, err := NewCryptoSetupClient("hostname", 0, version, stream, NewConnectionParamatersManager(protocol.PerspectiveClient, version))
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
cs = csInt.(*cryptoSetupClient)
|
||||
cs.certManager = certManager
|
||||
@@ -420,6 +421,17 @@ var _ = Describe("Crypto setup", func() {
|
||||
Expect(tags[TagCCS]).To(Equal(certManager.commonCertificateHashes))
|
||||
})
|
||||
|
||||
It("adds the tags returned from the connectionParametersManager to the CHLO", func() {
|
||||
cpmTags, err := cs.connectionParameters.GetCHLOMap()
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(cpmTags).ToNot(BeEmpty())
|
||||
tags, err := cs.getTags()
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
for t := range cpmTags {
|
||||
Expect(tags).To(HaveKey(t))
|
||||
}
|
||||
})
|
||||
|
||||
It("doesn't send a CCS if there are no common certificate sets available", func() {
|
||||
certManager.commonCertificateHashes = nil
|
||||
tags, err := cs.getTags()
|
||||
|
||||
Reference in New Issue
Block a user