use the new qtls SetWriteKey and SetReadKey interface

This commit is contained in:
Marten Seemann
2019-09-06 16:25:04 +07:00
parent 63c079e234
commit 33b74fca79
12 changed files with 78 additions and 89 deletions

View File

@@ -74,8 +74,8 @@ func (o *longHeaderOpener) DecryptHeader(sample []byte, firstByte *byte, pnBytes
o.headerProtector.DecryptHeader(sample, firstByte, pnBytes)
}
func createAEAD(suite cipherSuite, trafficSecret []byte) cipher.AEAD {
key := qtls.HkdfExpandLabel(suite.Hash(), trafficSecret, []byte{}, "quic key", suite.KeyLen())
iv := qtls.HkdfExpandLabel(suite.Hash(), trafficSecret, []byte{}, "quic iv", suite.IVLen())
func createAEAD(suite *qtls.CipherSuiteTLS13, trafficSecret []byte) cipher.AEAD {
key := qtls.HkdfExpandLabel(suite.Hash, trafficSecret, []byte{}, "quic key", suite.KeyLen)
iv := qtls.HkdfExpandLabel(suite.Hash, trafficSecret, []byte{}, "quic iv", suite.IVLen())
return suite.AEAD(key, iv)
}