mirror of
https://github.com/go-acme/lego.git
synced 2024-12-25 11:02:56 +02:00
fix: preferred chain only match root name (#1334)
This commit is contained in:
parent
6d068b5269
commit
1d24006e69
@ -540,10 +540,10 @@ func hasPreferredChain(issuer []byte, preferredChain string) (bool, error) {
|
||||
return false, err
|
||||
}
|
||||
|
||||
for _, cert := range certs {
|
||||
if cert.Issuer.CommonName == preferredChain {
|
||||
return true, nil
|
||||
}
|
||||
topCert := certs[len(certs)-1]
|
||||
|
||||
if topCert.Issuer.CommonName == preferredChain {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
return false, nil
|
||||
|
Loading…
Reference in New Issue
Block a user