Skip to content

Commit

Permalink
Update watcher.go
Browse files Browse the repository at this point in the history
  • Loading branch information
kruskall authored Aug 10, 2024
1 parent 4bafa3c commit f8f66e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docker/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,11 @@ func NewWatcher(log *logp.Logger, host string, cfg *TLSConfig, storeShortID bool
func certPool(caFile string) (*x509.CertPool, error) {
certPool, err := x509.SystemCertPool()
if err != nil {
return nil, fmt.Errorf("failed to read system certificates: %v", err)
return nil, fmt.Errorf("failed to read system certificates: %w", err)
}
pem, err := os.ReadFile(caFile)
if err != nil {
return nil, fmt.Errorf("could not read CA certificate %q: %v", caFile, err)
return nil, fmt.Errorf("could not read CA certificate %q: %w", caFile, err)
}
if !certPool.AppendCertsFromPEM(pem) {
return nil, fmt.Errorf("failed to append certificates from PEM file: %q", caFile)
Expand Down

0 comments on commit f8f66e2

Please sign in to comment.