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