Commit fd8ac04
feat: Support delegated targets roles in repo writer (#175)
* Support delegated targets roles in repo writer
* Add back return err in writeTopLevelTargetWithExpires
* Remove space
* Move hash bin impl to pkg/targets
* Fix build after rebase
* Make AddTargetsWithDigest support delegated targets
* Remove unused GetPublicKeys
* Revert "Remove unused GetPublicKeys"
This reverts commit 3daaeeb.
* Fix typo
* Easier hash bin usage when setting up delegations
* Remove comment that ChangePassphrase doesn't support delegated roles
* Update comments
* Add API to reset delegations
* clean up verifySignatures
* Fix tests for ChangePassphrase
* Fix comments
* Deduplicate key IDs when setting up hash bins
* Revert "Revert "Remove unused GetPublicKeys""
This reverts commit dbe6a4d.
* Add warning about GetSigners. TODO: fix usage
* Clean up some usage of setMetawithSigners
* Remove setMetaWithSigners since it's easy to misuse
* cleanup
* cleanup
* Cleanup usage of delegatorDBs
* Simplify AddTargetsWithExpiresToPreferredRole
* Remove debugging
* Remove targetsMetaWithSigners
* Fix comment
* Turn FIXME into an issue
* Fix comment position
* Remove out-of-place comment
* Add missing hyphen
* Test delegations construction more rigorously
* Support removing delegated targets files
* Fix tests
* Add more tests for delegation
* Fix unchecked error
* Clarify comment
* Better naming
* Support delegated targets in Sign and AddOrUpdateSignature
* Add test for ResetTargetsDelegationsWithExpires
* Improve naming of delegation methods
* Update tests for int64 version numbers
* Add tests for Sign and AddOrUpdateSignature with delegations
* Remove unused functions in errors.go
* Remove commented out test code
* Add test to verify that adding a delegation to an existing role doesn't change signed targets
* Fix SignMessage usage in test with new canonicalization pattern
Co-authored-by: Ethan Lowman <[email protected]>1 parent e2fb0ae commit fd8ac04
File tree
6 files changed
+1327
-188
lines changed- client
- verify
6 files changed
+1327
-188
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | 6 | | |
9 | 7 | | |
10 | 8 | | |
| |||
49 | 47 | | |
50 | 48 | | |
51 | 49 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | 50 | | |
67 | 51 | | |
68 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
| 45 | + | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
222 | 223 | | |
223 | 224 | | |
224 | 225 | | |
225 | | - | |
226 | | - | |
| 226 | + | |
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| |||
0 commit comments