You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// The SANs sent by the MeshCA are encoded as SPIFFE IDs. We need to
167
-
// only look at the SANs on the leaf cert.
168
-
ifcert:=certs[0]; !hi.MatchingSANExists(cert) {
169
-
// TODO: Print the complete certificate once the x509 package
170
-
// supports a String() method on the Certificate type.
171
-
returnfmt.Errorf("xds: received SANs {DNSNames: %v, EmailAddresses: %v, IPAddresses: %v, URIs: %v} do not match any of the accepted SANs", cert.DNSNames, cert.EmailAddresses, cert.IPAddresses, cert.URIs)
172
-
}
173
-
returnnil
174
-
}
175
139
176
140
// Perform the TLS handshake with the tls.Config that we have. We run the
177
141
// actual Handshake() function in a goroutine because we need to respect the
// The SANs sent by the MeshCA are encoded as SPIFFE IDs. We need to
204
+
// only look at the SANs on the leaf cert.
205
+
ifcert:=certs[0]; !hi.MatchingSANExists(cert) {
206
+
// TODO: Print the complete certificate once the x509 package
207
+
// supports a String() method on the Certificate type.
208
+
returnfmt.Errorf("xds: received SANs {DNSNames: %v, EmailAddresses: %v, IPAddresses: %v, URIs: %v} do not match any of the accepted SANs", cert.DNSNames, cert.EmailAddresses, cert.IPAddresses, cert.URIs)
209
+
}
210
+
returnnil
211
+
}
212
+
}
213
+
158
214
// ServerSideTLSConfig constructs a tls.Config to be used in a server-side
159
215
// handshake based on the contents of the HandshakeInfo.
0 commit comments