sftpd: remove diffie-hellman-group18-sha512 KEX

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2023-08-04 21:10:39 +02:00
parent af0d7b48ad
commit 75e6ef6132
4 changed files with 10 additions and 5 deletions

View File

@@ -468,6 +468,9 @@ func (c *Configuration) configureSecurityOptions(serverConfig *ssh.ServerConfig)
}
c.KexAlgorithms = util.RemoveDuplicates(c.KexAlgorithms, true)
for _, kex := range c.KexAlgorithms {
if kex == "diffie-hellman-group18-sha512" {
logger.Warn(logSender, "", "KEX %q is not supported and will be ignored", kex)
}
if !util.Contains(supportedKexAlgos, kex) {
return fmt.Errorf("unsupported key-exchange algorithm %q", kex)
}