crypto/ssh: add support for aes128-cbc cipher.

The aes128cbc cipher is commented out in cipher.go on purpose, anyone wants to
use the cipher needs to uncomment line 119 in cipher.go

Fixes #4274.

Change-Id: I4bbc88ab884bda821c5f155dcf495bb7235c8605
Reviewed-on: https://go-review.googlesource.com/8396
Reviewed-by: Adam Langley <agl@golang.org>
This commit is contained in:
Nathan(yinian) Hu
2015-04-10 21:42:31 +00:00
committed by Adam Langley
parent c57d4a7191
commit 5c68cfdf2a
5 changed files with 200 additions and 0 deletions
+8
View File
@@ -206,6 +206,14 @@ func (c *Config) SetDefaults() {
if c.Ciphers == nil {
c.Ciphers = supportedCiphers
}
var ciphers []string
for _, c := range c.Ciphers {
if cipherModes[c] != nil {
// reject the cipher if we have no cipherModes definition
ciphers = append(ciphers, c)
}
}
c.Ciphers = ciphers
if c.KeyExchanges == nil {
c.KeyExchanges = supportedKexAlgos