-
Notifications
You must be signed in to change notification settings - Fork 11.5k
fix: enable and update attestation document parsing logic #22120
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
@@ -594,8 +594,30 @@ impl AttestationDocument { | |||
pcr_vec.push(value.to_vec()); | |||
} | |||
} | |||
|
|||
// valid key is 0..31, can parse with u8. | |||
let key_u8 = u8::try_from(key).map_err(|_| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we already defined it above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah but i changed it from u64 to u8 since the valid values can be 0..31 only!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so you probably want to guard that try_from with is_upgraded_parsing as well, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes😅all error paths on the new parsing logic here should be guarded.
continue; | ||
} | ||
|
||
if pcr_map.contains_key(&key_u8) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to check here that !is_upgraded_parsing, no?
Description
Describe the changes or additions included in this PR.
Test plan
How did you test the new or updated feature?
Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.