diff options
| author | Nicola Murino <nicola.murino@gmail.com> | 2025-09-14 15:28:12 +0200 |
|---|---|---|
| committer | Nicola Murino <nicola.murino@gmail.com> | 2025-09-15 23:33:16 -0700 |
| commit | ddb4e80c6ad38c8a94001924a6ff8424f5cae369 (patch) | |
| tree | e7fe81070868398a4851433a840b75ff476e8fd9 /ssh/common.go | |
| parent | f4d47b0db5875e61dd52acdb63be800177ab48bb (diff) | |
| download | go-x-crypto-ddb4e80c6ad38c8a94001924a6ff8424f5cae369.tar.xz | |
ssh: remove custom contains, use slices.Contains
Change-Id: If4784469e7285675bdd51399a76bdc16f0036a2e
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/703635
Reviewed-by: Mark Freeman <markfreeman@google.com>
Reviewed-by: Sean Liao <sean@liao.dev>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'ssh/common.go')
| -rw-r--r-- | ssh/common.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ssh/common.go b/ssh/common.go index 36c82a7..b1884c2 100644 --- a/ssh/common.go +++ b/ssh/common.go @@ -345,7 +345,7 @@ func keyFormatForAlgorithm(sigAlgo string) string { // algorithms. func isRSA(algo string) bool { algos := algorithmsForKeyFormat(KeyAlgoRSA) - return contains(algos, underlyingAlgo(algo)) + return slices.Contains(algos, underlyingAlgo(algo)) } func isRSACert(algo string) bool { @@ -544,7 +544,7 @@ func (c *Config) SetDefaults() { if kexAlgoMap[k] != nil { // Ignore the KEX if we have no kexAlgoMap definition. kexs = append(kexs, k) - if k == KeyExchangeCurve25519 && !contains(c.KeyExchanges, keyExchangeCurve25519LibSSH) { + if k == KeyExchangeCurve25519 && !slices.Contains(c.KeyExchanges, keyExchangeCurve25519LibSSH) { kexs = append(kexs, keyExchangeCurve25519LibSSH) } } |
