Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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]>
- Loading branch information