mirror of
https://github.com/rancher/rke.git
synced 2025-09-24 21:07:32 +00:00
Merge pull request #1978 from rmweir/redundant-errors
No longer add first errors twice
This commit is contained in:
@@ -213,8 +213,9 @@ func validateCerts(state cluster.State) error {
|
||||
if _, err := cert.Verify(x509.VerifyOptions{Roots: certPool, KeyUsages: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth}}); err != nil {
|
||||
if failedErrs == nil {
|
||||
failedErrs = fmt.Errorf("Certificate [%s] failed verification: %v", certPKI.Name, err)
|
||||
} else {
|
||||
failedErrs = errors.Wrap(failedErrs, fmt.Sprintf("Certificate [%s] failed verification: %v", certPKI.Name, err))
|
||||
}
|
||||
failedErrs = errors.Wrap(failedErrs, fmt.Sprintf("Certificate [%s] failed verification: %v", certPKI.Name, err))
|
||||
}
|
||||
}
|
||||
if failedErrs != nil {
|
||||
|
Reference in New Issue
Block a user