Use slices.Contains in ssl/test/runner

Minor cleanup afforded by Go 1.21

Change-Id: I49a0f257f2585e54159014f1f442497a816e6589
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/66548
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Bob Beck <bbe@google.com>
diff --git a/go.mod b/go.mod
index ad1fc2c..4638955 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
 module boringssl.googlesource.com/boringssl
 
-go 1.19
+go 1.21
 
 require (
 	golang.org/x/crypto v0.17.0
diff --git a/ssl/test/runner/common.go b/ssl/test/runner/common.go
index 64f7741..666b4b6 100644
--- a/ssl/test/runner/common.go
+++ b/ssl/test/runner/common.go
@@ -2339,15 +2339,6 @@
 	return fmt.Errorf("tls: received unexpected handshake message of type %T when waiting for %T", got, wanted)
 }
 
-func isSupportedSignatureAlgorithm(sigAlg signatureAlgorithm, sigAlgs []signatureAlgorithm) bool {
-	for _, s := range sigAlgs {
-		if s == sigAlg {
-			return true
-		}
-	}
-	return false
-}
-
 var (
 	// See RFC 8446, section 4.1.3.
 	downgradeTLS13 = []byte{0x44, 0x4f, 0x57, 0x4e, 0x47, 0x52, 0x44, 0x01}
diff --git a/ssl/test/runner/sign.go b/ssl/test/runner/sign.go
index 70541a1..e0c6a92 100644
--- a/ssl/test/runner/sign.go
+++ b/ssl/test/runner/sign.go
@@ -18,6 +18,7 @@
 	"errors"
 	"fmt"
 	"math/big"
+	"slices"
 )
 
 type signer interface {
@@ -35,7 +36,7 @@
 	}
 
 	for _, sigAlg := range config.signSignatureAlgorithms() {
-		if !isSupportedSignatureAlgorithm(sigAlg, peerSigAlgs) {
+		if !slices.Contains(peerSigAlgs, sigAlg) {
 			continue
 		}
 
@@ -68,7 +69,7 @@
 }
 
 func verifyMessage(version uint16, key crypto.PublicKey, config *Config, sigAlg signatureAlgorithm, msg, sig []byte) error {
-	if version >= VersionTLS12 && !isSupportedSignatureAlgorithm(sigAlg, config.verifySignatureAlgorithms()) {
+	if version >= VersionTLS12 && !slices.Contains(config.verifySignatureAlgorithms(), sigAlg) {
 		return errors.New("tls: unsupported signature algorithm")
 	}