Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cert/verification.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ 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
}
a := make([]string, len(hosts))
for idx := range hosts {
// normalize the IPs.
Expand Down