From 1f9ab3b65f25077b3a4d1f3335affc0feb5e3ba3 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Wed, 28 Mar 2018 05:31:56 +0700 Subject: [PATCH] remove unused key exchange function from client crypto setup --- internal/handshake/crypto_setup_client.go | 2 -- internal/handshake/crypto_setup_client_test.go | 1 - 2 files changed, 3 deletions(-) diff --git a/internal/handshake/crypto_setup_client.go b/internal/handshake/crypto_setup_client.go index cb500b583..64d830f2d 100644 --- a/internal/handshake/crypto_setup_client.go +++ b/internal/handshake/crypto_setup_client.go @@ -44,7 +44,6 @@ type cryptoSetupClient struct { clientHelloCounter int serverVerified bool // has the certificate chain and the proof already been verified keyDerivation QuicCryptoKeyDerivationFunction - keyExchange KeyExchangeFunction receivedSecurePacket bool nullAEAD crypto.AEAD @@ -90,7 +89,6 @@ func NewCryptoSetupClient( certManager: crypto.NewCertManager(tlsConfig), params: params, keyDerivation: crypto.DeriveQuicCryptoAESKeys, - keyExchange: getEphermalKEX, nullAEAD: nullAEAD, paramsChan: paramsChan, handshakeEvent: handshakeEvent, diff --git a/internal/handshake/crypto_setup_client_test.go b/internal/handshake/crypto_setup_client_test.go index d4af7caaf..760485102 100644 --- a/internal/handshake/crypto_setup_client_test.go +++ b/internal/handshake/crypto_setup_client_test.go @@ -135,7 +135,6 @@ var _ = Describe("Client Crypto Setup", func() { cs = csInt.(*cryptoSetupClient) cs.certManager = certManager cs.keyDerivation = keyDerivation - cs.keyExchange = func() crypto.KeyExchange { return &mockKEX{ephermal: true} } cs.nullAEAD = mockcrypto.NewMockAEAD(mockCtrl) cs.cryptoStream = stream })