From 6a293f2d4b14b8e6d3f0539e383f6d0d30fce3fd Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Mon, 25 Sep 2017 13:22:06 +0200 Subject: [PATCH] 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 TryBot-Result: Gobot Gobot Reviewed-by: Han-Wen Nienhuys --- ssh/cipher.go | 2 +- ssh/transport.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ssh/cipher.go b/ssh/cipher.go index 22bb30c..aed2b1f 100644 --- a/ssh/cipher.go +++ b/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 diff --git a/ssh/transport.go b/ssh/transport.go index f9780e0..ab2b887 100644 --- a/ssh/transport.go +++ b/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 {