aboutsummaryrefslogtreecommitdiff
path: root/ssh/common.go
diff options
context:
space:
mode:
authorNathan(yinian) Hu <nathanhu@google.com>2015-04-08 12:39:14 +1000
committerAdam Langley <agl@golang.org>2015-04-10 21:42:31 +0000
commit5c68cfdf2a545b5ff576c075b459d1fc0c606f82 (patch)
treebac931fa27b9c6dfc9aead1fe72bcdbf980e4455 /ssh/common.go
parentc57d4a71915a248dbad846d60825145062b4c18e (diff)
downloadgo-x-crypto-5c68cfdf2a545b5ff576c075b459d1fc0c606f82.tar.xz
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>
Diffstat (limited to 'ssh/common.go')
-rw-r--r--ssh/common.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/ssh/common.go b/ssh/common.go
index 2fd7fd9..b03a3df 100644
--- a/ssh/common.go
+++ b/ssh/common.go
@@ -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