Skip to content

Commit

Permalink
fix: fix fetching updated targets from TUF root
Browse files Browse the repository at this point in the history
Signed-off-by: Asra Ali <asraa@google.com>

add comment

Signed-off-by: Asra Ali <asraa@google.com>

update

Signed-off-by: Asra Ali <asraa@google.com>

update

Signed-off-by: Asra Ali <asraa@google.com>

possible fix windows

Signed-off-by: Asra Ali <asraa@google.com>

lint

Signed-off-by: Asra Ali <asraa@google.com>
  • Loading branch information
asraa committed May 25, 2022
1 parent 5f09c42 commit 447e794
Show file tree
Hide file tree
Showing 4 changed files with 332 additions and 84 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -118,7 +118,7 @@ cross:
golangci-lint:
rm -f $(GOLANGCI_LINT_BIN) || :
set -e ;\
GOBIN=$(GOLANGCI_LINT_DIR) go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.43.0 ;\
GOBIN=$(GOLANGCI_LINT_DIR) go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.46.0 ;\

lint: golangci-lint ## Run golangci-lint linter
$(GOLANGCI_LINT_BIN) run -n
Expand Down
2 changes: 1 addition & 1 deletion cmd/cosign/cli/fulcio/fulcioroots/fulcioroots.go
Expand Up @@ -121,7 +121,7 @@ func initRoots() (*x509.CertPool, *x509.CertPool, error) {
// call is made to update the root.
targets, err := tufClient.GetTargetsByMeta(tuf.Fulcio, []string{fulcioTargetStr, fulcioV1TargetStr})
if err != nil {
return nil, nil, errors.New("error getting targets")
return nil, nil, fmt.Errorf("error getting targets: %w", err)
}
if len(targets) == 0 {
return nil, nil, errors.New("none of the Fulcio roots have been found")
Expand Down

0 comments on commit 447e794

Please sign in to comment.