theupdateframework / go-tuf

Go implementation of The Update Framework (TUF)
https://theupdateframework.com
Apache License 2.0
625 stars 105 forks source link

export API to set RefTime of Updater #641

Closed AdamKorcz closed 3 months ago

AdamKorcz commented 3 months ago

This PR exports an API to set the RefTime of the trusted metadata of an Updater. This is useful for testing time-related cases in the client outside of go-tufs own repository.

kommendorkapten commented 3 months ago

Thanks for the contribution @AdamKorcz, would you mind also adding a comment describing this, why it may be useful and any consequences of using this in a real life application?

AdamKorcz commented 3 months ago

Thanks for the contribution @AdamKorcz, would you mind also adding a comment describing this, why it may be useful and any consequences of using this in a real life application?

https://github.com/theupdateframework/go-tuf/pull/641/commits/faf9792df89ebd60c16f13d49d22d6ea13868b1d - LMK if it needs more context. I have kept it short to align the description with other methods in the file.

kommendorkapten commented 3 months ago

@rdimitrov @trishankatdatadog any thoughts?

kommendorkapten commented 3 months ago

I think it's fine w/out get/set? The other fields are lacking this, and I think it's clear with the current design?