Skip to content

Commit

Permalink
# This is a combination of 8 commits.
Browse files Browse the repository at this point in the history
# This is the 1st commit message:

[Delegations prereq] Use a verify.DB for delegation in client

Splitting up theupdateframework#175

# This is the commit message theupdateframework#2:

stash

# This is the commit message theupdateframework#3:

Add tests to make sure the top level targets 'delegation' edge has associated keys. Make NewDelegationsIterator return an error if the passed DB is missing the top level targets role

# This is the commit message theupdateframework#4:

[Delegations prereq] Make signers addressible by key ID in LocalStore

Splitting up theupdateframework#175

# This is the commit message theupdateframework#5:

Clarify naming

# This is the commit message theupdateframework#6:

Add local_store_test.go

# This is the commit message theupdateframework#7:

Another test case

# This is the commit message theupdateframework#8:

[Delegations prereq] Use a verify.DB for delegation in client

Splitting up theupdateframework#175
  • Loading branch information
ethan-lowman-dd committed Mar 9, 2022
1 parent 95316de commit 8731be0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/targets/delegation.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"errors"

"github.com/theupdateframework/go-tuf/data"
"github.com/theupdateframework/go-tuf/internal/sets"
"github.com/theupdateframework/go-tuf/verify"
)

Expand All @@ -24,12 +25,11 @@ var ErrTopLevelTargetsRoleMissing = errors.New("tuf: top level targets role miss
// NewDelegationsIterator initialises an iterator with a first step
// on top level targets.
func NewDelegationsIterator(target string, topLevelKeysDB *verify.DB) *delegationsIterator {
// role := topLevelKeysDB.GetRole("targets")
role := topLevelKeysDB.GetRole("targets")
keyIDs := []string{}

// if role != nil {
// keyIDs = sets.StringSetToSlice(role.KeyIDs)
// }
if role != nil {
keyIDs = sets.StringSetToSlice(role.KeyIDs)
}

i := &delegationsIterator{
target: target,
Expand Down

0 comments on commit 8731be0

Please sign in to comment.