Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update TUF client to support options and add LiveTrustedRoot (#41)
* Update TUF client to support options and add LiveTrustedRoot Signed-off-by: Cody Soyland <[email protected]> * Make sure DefaultOptions never fails Signed-off-by: Fredrik Skogman <[email protected]> * avoid empty strings for arguments, use named attributes Signed-off-by: Fredrik Skogman <[email protected]> * Ignore emacs backup files Signed-off-by: Fredrik Skogman <[email protected]> * Created a bascig config file for the tuf client Signed-off-by: Fredrik Skogman <[email protected]> * Style fixes Signed-off-by: Fredrik Skogman <[email protected]> * Made consistent snapshot configurable Signed-off-by: Fredrik Skogman <[email protected]> * Clarified the use of unsafe local mode Signed-off-by: Fredrik Skogman <[email protected]> * Updated to go-tuf/v2@master Signed-off-by: Fredrik Skogman <[email protected]> * Resolved merge conflict Signed-off-by: Fredrik Skogman <[email protected]> * Fixed errors from linter Signed-off-by: Fredrik Skogman <[email protected]> * Use short variable declaration syntax Co-authored-by: Hayden B <[email protected]> Signed-off-by: Cody Soyland <[email protected]> * Remove old unused embedded root Signed-off-by: Cody Soyland <[email protected]> * Add func to fetch TUF root with given options Signed-off-by: Cody Soyland <[email protected]> * Add chainable functional options to Options struct Signed-off-by: Cody Soyland <[email protected]> * Update CodeQL action Signed-off-by: Cody Soyland <[email protected]> * Setup Go version in CodeQL workflwo Signed-off-by: Cody Soyland <[email protected]> * Don't specify minor go version Signed-off-by: Fredrik Skogman <[email protected]> * Added a simple test for an offline cliant Signed-off-by: Fredrik Skogman <[email protected]> * Add TUF repo creation and basic test to create a client Signed-off-by: Cody Soyland <[email protected]> * Made the tuf root file configurable via the command line Signed-off-by: Fredrik Skogman <[email protected]> * Use consts from go-tuf Signed-off-by: Cody Soyland <[email protected]> * Add test to fetch target Signed-off-by: Cody Soyland <[email protected]> * Breakout publish Signed-off-by: Cody Soyland <[email protected]> * Add target support and refresh test Signed-off-by: Cody Soyland <[email protected]> * Add TUF caching tests Signed-off-by: Cody Soyland <[email protected]> * Remove unreachable code, add more tests It is impossible to reach the timestamp checks in loadMetadata, as the preceeding code to load metadata and verify it will force an online refresh anyway, so at this point, the cache has already been updated. Setting RemoteTargetsURL is not necessary as go-tuf will set that correctly by default. Signed-off-by: Cody Soyland <[email protected]> * Updated go-tuf Signed-off-by: Fredrik Skogman <[email protected]> * Updated to latest go-tuf Signed-off-by: Fredrik Skogman <[email protected]> * Clarified that the updates is replaced, not the actual tuf client Signed-off-by: Fredrik Skogman <[email protected]> * Updated to new error type (pointer) Signed-off-by: Fredrik Skogman <[email protected]> * Use 0 days for default CacheValidity Signed-off-by: Cody Soyland <[email protected]> * Clarify CacheValidity option and add NoCache/MaxCache consts Signed-off-by: Cody Soyland <[email protected]> --------- Signed-off-by: Cody Soyland <[email protected]> Signed-off-by: Fredrik Skogman <[email protected]> Co-authored-by: Fredrik Skogman <[email protected]> Co-authored-by: Hayden B <[email protected]>
- Loading branch information