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

Drop MetadataVersion::Hash, resolve #254 #262

Closed
wants to merge 1 commit into from
Closed

Drop MetadataVersion::Hash, resolve #254 #262

wants to merge 1 commit into from

Conversation

cavokz
Copy link
Contributor

@cavokz cavokz commented Jan 2, 2020

No description provided.

Copy link
Collaborator

@erickt erickt left a comment

Choose a reason for hiding this comment

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

Thanks for this! Other than my in-line comment, can you also:

  • check if python-tuf is fetching delegations by version number, just to be safe?
  • add a test to make sure we are fetching delegations by version number. Simplest would be to extend src/client.rs's test_versioned_init with a delegation. You can find how to make a delegation by looking at tests/integration.rs.

@@ -871,12 +871,6 @@ where
Err(e) => return (delegation.terminating(), Err(e)),
};

let version = if self.tuf.root().consistent_snapshot() {
MetadataVersion::Hash(value.clone())
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we want this conditional, just returning MetadataVersion::Number(role_meta.version()) when consistent snapshot is enabled.

@cavokz
Copy link
Contributor Author

cavokz commented Jan 3, 2020

I addressed the inline comment, I'll handle the test extension in a separate commit. I still need to understand a few more things. Thanks!

@erickt
Copy link
Collaborator

erickt commented Nov 5, 2020

This was incorporated into another PR that has since landed. Thanks!

@erickt erickt closed this Nov 5, 2020
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.

None yet

2 participants