Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tough: Split into tough and tough_schema #145

Merged
merged 1 commit into from
Aug 15, 2019
Merged

tough: Split into tough and tough_schema #145

merged 1 commit into from
Aug 15, 2019

Conversation

iliana
Copy link
Contributor

@iliana iliana commented Aug 12, 2019

Description of changes:
This splits out the inner serde module from tough into a new top-level crate, which will allow me to write a separate TUF repository generation tool from the same underlying struct definitions.

I made a number of changes to the overall shape of the crate; all the top-level role types (Root, Timestamp, etc) and their substructs were moved into lib.rs. The confusingly-named trait Metadata was renamed to Role, and the enum Role was renamed to RoleType.

Since we are now using olpc_cjson, I reordered struct items and other things to match the order that they're listed in the TUF spec, and replaced uses of BTreeMap with HashMap. This also allowed me to store any extra data in the structures, which fixes #66 (although I need to add test cases to verify this).

Ran Thar with these changes and was able to execute updog update and reboot.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Contributor

@tjkirch tjkirch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, this is mostly requests for more documentation on certain things...

workspaces/updater/tough_schema/src/sealed.rs Outdated Show resolved Hide resolved
workspaces/updater/tough/src/lib.rs Show resolved Hide resolved
workspaces/updater/tough_schema/src/decoded.rs Outdated Show resolved Hide resolved
workspaces/updater/tough_schema/src/iter.rs Show resolved Hide resolved
workspaces/updater/tough_schema/src/key.rs Outdated Show resolved Hide resolved
workspaces/updater/tough_schema/src/lib.rs Show resolved Hide resolved
workspaces/updater/tough_schema/src/decoded.rs Outdated Show resolved Hide resolved
workspaces/updater/tough_schema/src/iter.rs Outdated Show resolved Hide resolved
workspaces/updater/tough_schema/src/key.rs Outdated Show resolved Hide resolved
Signed-off-by: iliana destroyer of worlds <iweller@amazon.com>
@iliana iliana merged commit 41446c0 into develop Aug 15, 2019
@tjkirch tjkirch deleted the tough-split branch August 19, 2019 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tough: Signature verification fails if ignored data is present
2 participants