Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
ttrssreal committed Jan 10, 2025
1 parent 15d6fb6 commit 80f93bc
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions nixos/ari/001-fix-certmgr-hostname-checks.patch
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
diff --git a/cert/verification.go b/cert/verification.go
index 4af0d77..ac74493 100644
index 39f255c..b80a643 100644
--- a/cert/verification.go
+++ b/cert/verification.go
@@ -10,6 +10,10 @@ import (
@@ -10,6 +10,11 @@ import (

// CertificateMatchesHostname checks if the Certificates hosts are the same as the given hosts
func CertificateMatchesHostname(hosts []string, cert *x509.Certificate) bool {
+ // skip checks for kubernetes system certs with invalid DNS names (i.e. CN=system:kube-proxy)
+ if len(hosts) == 1 && len(cert.DNSNames)+len(cert.IPAddresses) == 0 {
+ return true
+ if len(hosts) == 1 && len(cert.DNSNames) + len(cert.IPAddresses) == 0 {
+ return true
+ }
a := make([]string, len(hosts))
for idx := range hosts {
// normalize the IPs.
+
a := make([]string, len(hosts))
for idx := range hosts {
// normalize the IPs.

0 comments on commit 80f93bc

Please sign in to comment.