go.crypto/ssh: add support for diffie-hellman-group1-sha1.

Fixes golang/go#2903.

R=golang-dev
CC=agl, golang-dev
https://golang.org/cl/5755054
This commit is contained in:
Daniel Theophanes
2012-03-06 11:25:32 -05:00
committed by Adam Langley
parent 79d53bd55e
commit 36a967d321
3 changed files with 25 additions and 1 deletions
+4
View File
@@ -272,6 +272,10 @@ func (s *ServerConn) Handshake() error {
hashFunc = crypto.SHA1
dhGroup14Once.Do(initDHGroup14)
H, K, err = s.kexDH(dhGroup14, hashFunc, &magics, hostKeyAlgo)
case keyAlgoDH1SHA1:
hashFunc = crypto.SHA1
dhGroup1Once.Do(initDHGroup1)
H, K, err = s.kexDH(dhGroup1, hashFunc, &magics, hostKeyAlgo)
default:
err = errors.New("ssh: unexpected key exchange algorithm " + kexAlgo)
}