Merge pull request #1104 from aledbf/ssl-check
Simplify verification of hostname in ssl certificates
This commit is contained in:
commit
d28ea365fb
5 changed files with 7 additions and 130 deletions
|
|
@ -1109,8 +1109,9 @@ func (ic *GenericController) createServers(data []interface{},
|
|||
}
|
||||
|
||||
cert := bc.(*ingress.SSLCert)
|
||||
if !isHostValid(host, cert) {
|
||||
glog.Warningf("ssl certificate %v does not contain a common name for host %v", key, host)
|
||||
err = cert.Certificate.VerifyHostname(host)
|
||||
if err != nil {
|
||||
glog.Warningf("ssl certificate %v does not contain a Common Name or Subject Alternative Name for host %v", key, host)
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue