summaryrefslogtreecommitdiff
path: root/internal/sshd
diff options
context:
space:
mode:
authorMarshall Cottrell <mcottrell@gitlab.com>2022-05-23 16:54:14 -0400
committerMarshall Cottrell <mcottrell@gitlab.com>2022-05-23 16:54:14 -0400
commit06a0ffe73ccde266f6e80b3846087caa20dfec96 (patch)
tree35e026007eb7c63829d407aea8a9bf0439f73c1f /internal/sshd
parentc40ad688ed72357a58ba8481ba9382cabfc59375 (diff)
downloadgitlab-shell-marshall_algo-consts.tar.gz
reference kex and mac algo constantsmarshall_algo-consts
Depends on gitlab-org/golang-crypto!5
Diffstat (limited to 'internal/sshd')
-rw-r--r--internal/sshd/server_config.go24
-rw-r--r--internal/sshd/server_config_test.go4
2 files changed, 14 insertions, 14 deletions
diff --git a/internal/sshd/server_config.go b/internal/sshd/server_config.go
index 7fb73dc..44c5912 100644
--- a/internal/sshd/server_config.go
+++ b/internal/sshd/server_config.go
@@ -18,21 +18,21 @@ import (
var (
supportedMACs = []string{
- "hmac-sha2-256-etm@openssh.com",
- "hmac-sha2-512-etm@openssh.com",
- "hmac-sha2-256",
- "hmac-sha2-512",
- "hmac-sha1",
+ ssh.MacAlgoHmacSHA2256ETM,
+ ssh.MacAlgoHmacSHA2512ETM,
+ ssh.MacAlgoHmacSHA2256,
+ ssh.MacAlgoHmacSHA2512,
+ ssh.MacAlgoHmacSHA1,
}
supportedKeyExchanges = []string{
- "curve25519-sha256",
- "curve25519-sha256@libssh.org",
- "ecdh-sha2-nistp256",
- "ecdh-sha2-nistp384",
- "ecdh-sha2-nistp521",
- "diffie-hellman-group14-sha256",
- "diffie-hellman-group14-sha1",
+ ssh.KexAlgoCurve25519SHA256,
+ ssh.KexAlgoCurve25519SHA256LibSSH,
+ ssh.KexAlgoECDH256,
+ ssh.KexAlgoECDH384,
+ ssh.KexAlgoECDH521,
+ ssh.KexAlgoDH14SHA256,
+ ssh.KexAlgoDH14SHA1,
}
)
diff --git a/internal/sshd/server_config_test.go b/internal/sshd/server_config_test.go
index f7e0575..a13f3f7 100644
--- a/internal/sshd/server_config_test.go
+++ b/internal/sshd/server_config_test.go
@@ -105,8 +105,8 @@ func TestDefaultAlgorithms(t *testing.T) {
}
func TestCustomAlgorithms(t *testing.T) {
- customMACs := []string{"hmac-sha2-512-etm@openssh.com"}
- customKexAlgos := []string{"curve25519-sha256"}
+ customMACs := []string{ssh.MacAlgoHmacSHA2512ETM}
+ customKexAlgos := []string{ssh.KexAlgoCurve25519SHA256}
customCiphers := []string{"aes256-gcm@openssh.com"}
srvCfg := &serverConfig{