Merge pull request #899 from lucas-clemente/fix-898

encrypt unprotected packets with a connection-dependent key
This commit is contained in:
Marten Seemann
2017-10-27 22:52:04 +07:00
committed by GitHub
19 changed files with 396 additions and 266 deletions

View File

@@ -78,6 +78,10 @@ func NewCryptoSetup(
paramsChan chan<- TransportParameters,
aeadChanged chan<- protocol.EncryptionLevel,
) (CryptoSetup, error) {
nullAEAD, err := crypto.NewNullAEAD(protocol.PerspectiveServer, connID, version)
if err != nil {
return nil, err
}
return &cryptoSetupServer{
cryptoStream: cryptoStream,
connID: connID,
@@ -87,7 +91,7 @@ func NewCryptoSetup(
scfg: scfg,
keyDerivation: crypto.DeriveQuicCryptoAESKeys,
keyExchange: getEphermalKEX,
nullAEAD: crypto.NewNullAEAD(protocol.PerspectiveServer, version),
nullAEAD: nullAEAD,
params: params,
acceptSTKCallback: acceptSTK,
sentSHLO: make(chan struct{}),