From 80f93bc9b37ed3d220724ae52571dbd1738dcdb4 Mon Sep 17 00:00:00 2001 From: Jess Date: Sat, 11 Jan 2025 07:57:49 +1300 Subject: [PATCH] fixup --- nixos/ari/001-fix-certmgr-hostname-checks.patch | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/nixos/ari/001-fix-certmgr-hostname-checks.patch b/nixos/ari/001-fix-certmgr-hostname-checks.patch index d23a347..b9325c7 100644 --- a/nixos/ari/001-fix-certmgr-hostname-checks.patch +++ b/nixos/ari/001-fix-certmgr-hostname-checks.patch @@ -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.