send KEXS and AEAD value in full client hello

This commit is contained in:
Marten Seemann
2016-12-03 21:13:22 +07:00
parent 63f2faec85
commit fdd0fdf90d
2 changed files with 5 additions and 1 deletions

View File

@@ -325,6 +325,8 @@ func (h *cryptoSetupClient) getTags() (map[Tag][]byte, error) {
tags[TagNONC] = h.nonc
tags[TagXLCT] = xlct
tags[TagKEXS] = []byte("C255")
tags[TagAEAD] = []byte("AESG")
tags[TagPUBS] = h.serverConfig.kex.PublicKey() // TODO: check if 3 bytes need to be prepended
}
}

View File

@@ -420,7 +420,7 @@ var _ = Describe("Crypto setup", func() {
Expect(cs.getTags()).To(Equal(tags))
})
It("sends a client nonce, a public value and the cert hash after reading the certificate and the server config", func() {
It("sends a the values needed for a full CHLO after reading the certificate and the server config", func() {
certManager.leafCert = []byte("leafcert")
cs.nonc = []byte("client-nonce")
kex, err := crypto.NewCurve25519KEX()
@@ -433,6 +433,8 @@ var _ = Describe("Crypto setup", func() {
Expect(tags[TagNONC]).To(Equal(cs.nonc))
Expect(tags[TagPUBS]).To(Equal(kex.PublicKey()))
Expect(tags[TagXLCT]).To(Equal(xlct))
Expect(tags[TagKEXS]).To(Equal([]byte("C255")))
Expect(tags[TagAEAD]).To(Equal([]byte("AESG")))
})
It("doesn't send more than MaxClientHellos CHLOs", func() {