forked from TrueCloudLab/lego
fix: preferred chain only match root name (#1334)
This commit is contained in:
parent
6d068b5269
commit
1d24006e69
1 changed files with 4 additions and 4 deletions
|
@ -540,11 +540,11 @@ func hasPreferredChain(issuer []byte, preferredChain string) (bool, error) {
|
|||
return false, err
|
||||
}
|
||||
|
||||
for _, cert := range certs {
|
||||
if cert.Issuer.CommonName == preferredChain {
|
||||
topCert := certs[len(certs)-1]
|
||||
|
||||
if topCert.Issuer.CommonName == preferredChain {
|
||||
return true, nil
|
||||
}
|
||||
}
|
||||
|
||||
return false, nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue