|
|
@@ -24,12 +24,21 @@ const (
|
|
|
serviceSSH = "ssh-connection"
|
|
|
)
|
|
|
|
|
|
-// supportedCiphers specifies the supported ciphers in preference order.
|
|
|
+// supportedCiphers lists ciphers we support but might not recommend.
|
|
|
var supportedCiphers = []string{
|
|
|
"aes128-ctr", "aes192-ctr", "aes256-ctr",
|
|
|
"aes128-gcm@openssh.com",
|
|
|
chacha20Poly1305ID,
|
|
|
- "arcfour256", "arcfour128",
|
|
|
+ "arcfour256", "arcfour128", "arcfour",
|
|
|
+ aes128cbcID,
|
|
|
+ tripledescbcID,
|
|
|
+}
|
|
|
+
|
|
|
+// preferredCiphers specifies the default preference for ciphers.
|
|
|
+var preferredCiphers = []string{
|
|
|
+ "aes128-ctr", "aes192-ctr", "aes256-ctr",
|
|
|
+ "aes128-gcm@openssh.com",
|
|
|
+ chacha20Poly1305ID,
|
|
|
}
|
|
|
|
|
|
// supportedKexAlgos specifies the supported key-exchange algorithms in
|
|
|
@@ -212,7 +221,7 @@ func (c *Config) SetDefaults() {
|
|
|
c.Rand = rand.Reader
|
|
|
}
|
|
|
if c.Ciphers == nil {
|
|
|
- c.Ciphers = supportedCiphers
|
|
|
+ c.Ciphers = preferredCiphers
|
|
|
}
|
|
|
var ciphers []string
|
|
|
for _, c := range c.Ciphers {
|