ssh: expose negotiated algorithms
Fixes golang/go#58523 Fixes golang/go#46638 Change-Id: Ic64bd2fdd6e9ec96acac3ed4be842e2fbb15231d Reviewed-on: https://go-review.googlesource.com/c/crypto/+/538235 Reviewed-by: Filippo Valsorda <filippo@golang.org> Auto-Submit: Nicola Murino <nicola.murino@gmail.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
committed by
Gopher Robot
parent
78a1fd7893
commit
e944286e33
+6
-6
@@ -44,10 +44,10 @@ func TestPacketCiphers(t *testing.T) {
|
||||
|
||||
func testPacketCipher(t *testing.T, cipher, mac string) {
|
||||
kr := &kexResult{Hash: crypto.SHA1}
|
||||
algs := directionAlgorithms{
|
||||
algs := DirectionAlgorithms{
|
||||
Cipher: cipher,
|
||||
MAC: mac,
|
||||
Compression: compressionNone,
|
||||
compression: compressionNone,
|
||||
}
|
||||
client, err := newPacketCipher(clientKeys, algs, kr)
|
||||
if err != nil {
|
||||
@@ -77,10 +77,10 @@ func testPacketCipher(t *testing.T, cipher, mac string) {
|
||||
|
||||
func TestCBCOracleCounterMeasure(t *testing.T) {
|
||||
kr := &kexResult{Hash: crypto.SHA1}
|
||||
algs := directionAlgorithms{
|
||||
algs := DirectionAlgorithms{
|
||||
Cipher: InsecureCipherAES128CBC,
|
||||
MAC: HMACSHA1,
|
||||
Compression: compressionNone,
|
||||
compression: compressionNone,
|
||||
}
|
||||
client, err := newPacketCipher(clientKeys, algs, kr)
|
||||
if err != nil {
|
||||
@@ -204,10 +204,10 @@ func TestCVE202143565(t *testing.T) {
|
||||
mac := HMACSHA256
|
||||
|
||||
kr := &kexResult{Hash: crypto.SHA1}
|
||||
algs := directionAlgorithms{
|
||||
algs := DirectionAlgorithms{
|
||||
Cipher: tc.cipher,
|
||||
MAC: mac,
|
||||
Compression: compressionNone,
|
||||
compression: compressionNone,
|
||||
}
|
||||
client, err := newPacketCipher(clientKeys, algs, kr)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user