diff options
author | Jaime Martinez <jmartinez@gitlab.com> | 2020-07-20 02:34:35 +0300 |
---|---|---|
committer | Jaime Martinez <jmartinez@gitlab.com> | 2020-07-20 02:34:35 +0300 |
commit | 8d65281f548d6a25e764e1ca47a9821a3d8152a7 (patch) | |
tree | 6de37e12afa534561ecfaf51d1acde73c608991d /internal/httptransport | |
parent | 86d8d6765106ba96eda65e1212dd5fe4a0ec5d86 (diff) |
Load first directory only
Diffstat (limited to 'internal/httptransport')
-rw-r--r-- | internal/httptransport/transport_darwin.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/internal/httptransport/transport_darwin.go b/internal/httptransport/transport_darwin.go index 8a8bddaa..b73009da 100644 --- a/internal/httptransport/transport_darwin.go +++ b/internal/httptransport/transport_darwin.go @@ -74,12 +74,18 @@ func loadCertDir() error { } continue } + + rootsAdded := false for _, fi := range fis { data, err := ioutil.ReadFile(directory + "/" + fi.Name()) - if err == nil { - sysPool.AppendCertsFromPEM(data) + if err == nil && sysPool.AppendCertsFromPEM(data) { + rootsAdded = true } } + + if rootsAdded { + return nil + } } return firstErr |