Merge pull request #129430 from MadhavJivrajani/go124-webhook-regex-ut

[go1.24] webhook: alter regex to account for x509sha1 GODEBUG removal

Kubernetes-commit: c3f3fdc1aa62002a58bec1141fe69e86bbb27491
This commit is contained in:
Kubernetes Publisher 2025-01-06 21:28:30 +01:00
commit 2cad252f0c
1 changed files with 2 additions and 2 deletions

View File

@ -406,14 +406,14 @@ func TestTLSConfig(t *testing.T) {
test: "server cert with SHA1 signature",
clientCA: caCert,
serverCert: append(append(sha1ServerCertInter, byte('\n')), caCertInter...), serverKey: serverKey,
errRegex: "x509: cannot verify signature: insecure algorithm SHA1-RSA \\(temporarily override with GODEBUG=x509sha1=1\\)",
errRegex: "x509: cannot verify signature: insecure algorithm SHA1-RSA",
increaseSHA1SignatureWarnCounter: true,
},
{
test: "server cert signed by an intermediate CA with SHA1 signature",
clientCA: caCert,
serverCert: append(append(serverCertInterSHA1, byte('\n')), caCertInterSHA1...), serverKey: serverKey,
errRegex: "x509: cannot verify signature: insecure algorithm SHA1-RSA \\(temporarily override with GODEBUG=x509sha1=1\\)",
errRegex: "x509: cannot verify signature: insecure algorithm SHA1-RSA",
increaseSHA1SignatureWarnCounter: true,
},
}