mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #8223 from heyitsanthony/ip-san-exit
transport: accept connection if matched IP SAN but no DNS match
This commit is contained in:
commit
67fa8b823f
@ -197,7 +197,11 @@ func checkCertSAN(ctx context.Context, cert *x509.Certificate, remoteAddr string
|
|||||||
return herr
|
return herr
|
||||||
}
|
}
|
||||||
if len(cert.IPAddresses) > 0 {
|
if len(cert.IPAddresses) > 0 {
|
||||||
if cerr := cert.VerifyHostname(h); cerr != nil && len(cert.DNSNames) == 0 {
|
cerr := cert.VerifyHostname(h)
|
||||||
|
if cerr == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
if len(cert.DNSNames) == 0 {
|
||||||
return cerr
|
return cerr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user