-
Notifications
You must be signed in to change notification settings - Fork 111
feat: add Unknown validation state #1543
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
base: main
Are you sure you want to change the base?
Changes from all commits
a6d3823
75bc108
10f0679
b839a50
3fc7e91
3f72571
628683f
e6351cf
307d865
38fdd24
2f8d88f
3c4ba9a
f25723b
aadcb02
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,10 +35,10 @@ use crate::{ | |
| #[derive(Copy, Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] | ||
| #[cfg_attr(feature = "json_schema", derive(JsonSchema))] | ||
| pub enum ValidationState { | ||
| /// Validation is disabled in the SDK and the [ValidationState] is unable to be determined. | ||
| Unknown, | ||
| /// The manifest store fails to meet [ValidationState::WellFormed] requirements, meaning it cannot | ||
| /// even be parsed or its basic structure is non-compliant. | ||
| /// | ||
| /// This case may also occur if validation is disabled in the SDK. | ||
| Invalid, | ||
| /// The manifest store is well-formed and the cryptographic integrity checks succeed. | ||
| /// | ||
|
|
@@ -238,6 +238,10 @@ impl ValidationResults { | |
| } else if is_valid { | ||
| return ValidationState::Valid; | ||
| } | ||
| } else { | ||
| // REVIEW-NOTE: is this the best way to detect that it wasn't validated? should we also check if success/failure is empty if there | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this work? I'm not sure if there will always be no active manifest in validation_results if we did not validate.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I think it's a safe assumption that if there's no active_manifest then it hasn't been validated, or at the very least it couldn't be determined. The only problem is that we populate the validation results on a |
||
| // is an active manifest? | ||
| return ValidationState::Unknown; | ||
| } | ||
|
|
||
| ValidationState::Invalid | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.