Pārlūkot izejas kodu

ssh: remove unused parameter of newGCMCipher

The macKey parameter of newGCMCipher is not used inside the function.
Remove it and adjust the only caller accordingly.

Change-Id: Ieb9c70d7f51825d734fdeedbc8962f0178fc0131
Reviewed-on: https://go-review.googlesource.com/65890
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Han-Wen Nienhuys <hanwen@google.com>
Tobias Klauser 8 gadi atpakaļ
vecāks
revīzija
6a293f2d4b
2 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 1 1
      ssh/cipher.go
  2. 1 1
      ssh/transport.go

+ 1 - 1
ssh/cipher.go

@@ -304,7 +304,7 @@ type gcmCipher struct {
 	buf    []byte
 }
 
-func newGCMCipher(iv, key, macKey []byte) (packetCipher, error) {
+func newGCMCipher(iv, key []byte) (packetCipher, error) {
 	c, err := aes.NewCipher(key)
 	if err != nil {
 		return nil, err

+ 1 - 1
ssh/transport.go

@@ -254,7 +254,7 @@ func newPacketCipher(d direction, algs directionAlgorithms, kex *kexResult) (pac
 	iv, key, macKey := generateKeys(d, algs, kex)
 
 	if algs.Cipher == gcmCipherID {
-		return newGCMCipher(iv, key, macKey)
+		return newGCMCipher(iv, key)
 	}
 
 	if algs.Cipher == aes128cbcID {