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

[go1.24][1.31] webhook: alter regex to account for x509sha1 GODEBUG removal
This commit is contained in:
Kubernetes Prow Robot 2025-01-09 08:16:31 -08:00 committed by GitHub
commit 1043bf333c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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,
},
}