Skip to content

Commit 6f84372

Browse files
MadhavJivrajanik8s-publishing-bot
authored andcommitted
webhook: alter regex to account for x509sha1 GODEBUG removal
go1.24 removes the x509sha1 GODEBUG variable, and with it the support for SHA-1 signed certs. This commit alters the regex in unit tests to account for that and prep for go1.24. Signed-off-by: Madhav Jivrajani <[email protected]> Kubernetes-commit: 774adff447f91fa56b57591a5e5584fa44375ed7
1 parent 2a99607 commit 6f84372

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/util/webhook/webhook_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,14 +406,14 @@ func TestTLSConfig(t *testing.T) {
406406
test: "server cert with SHA1 signature",
407407
clientCA: caCert,
408408
serverCert: append(append(sha1ServerCertInter, byte('\n')), caCertInter...), serverKey: serverKey,
409-
errRegex: "x509: cannot verify signature: insecure algorithm SHA1-RSA \\(temporarily override with GODEBUG=x509sha1=1\\)",
409+
errRegex: "x509: cannot verify signature: insecure algorithm SHA1-RSA",
410410
increaseSHA1SignatureWarnCounter: true,
411411
},
412412
{
413413
test: "server cert signed by an intermediate CA with SHA1 signature",
414414
clientCA: caCert,
415415
serverCert: append(append(serverCertInterSHA1, byte('\n')), caCertInterSHA1...), serverKey: serverKey,
416-
errRegex: "x509: cannot verify signature: insecure algorithm SHA1-RSA \\(temporarily override with GODEBUG=x509sha1=1\\)",
416+
errRegex: "x509: cannot verify signature: insecure algorithm SHA1-RSA",
417417
increaseSHA1SignatureWarnCounter: true,
418418
},
419419
}

0 commit comments

Comments
 (0)