rust-tuf
rust-tuf copied to clipboard
Metadata update needs better Ok/Err logic
Currently the outcomes of updating are:
- Things are ok, we did an update.
- Things are ok, we did not update.
- Everything is borked and on fire.
Return should be:
- Update happened, we are in a legal state.
- Update did not happen, we are in a legal state.
- We are in an illegal state.
For example, it may be reasonable for this to happen:
- Update local root to v1
- Update local timestamp to v1
- Update local snapshot to v1
- Update local targets to v1
Then
- Try to update remote timestamp to v2, but fail
- Continue anyway because the TUF internal state is consistent