Skip to content

Commit 3ca71ba

Browse files
committed
fixup! Certificate support for image registry
1 parent 421d281 commit 3ca71ba

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

internal/httputil/httputil.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"crypto/x509"
66
"net/http"
77
"os"
8+
"path/filepath"
89
"strings"
910
"time"
1011
)
@@ -14,7 +15,7 @@ func LoadCerts(caDir string) (string, error) {
1415
return "", nil
1516
}
1617

17-
var certs []string
18+
certs := []string{}
1819
dirEntries, err := os.ReadDir(caDir)
1920
if err != nil {
2021
return "", err
@@ -23,7 +24,7 @@ func LoadCerts(caDir string) (string, error) {
2324
if e.IsDir() {
2425
continue
2526
}
26-
data, err := os.ReadFile(e.Name())
27+
data, err := os.ReadFile(filepath.Join(caDir, e.Name()))
2728
if err != nil {
2829
return "", err
2930
}

0 commit comments

Comments
 (0)