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

Correct DCAP constants #1488

Merged
merged 1 commit into from
Dec 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 16 additions & 5 deletions pallets/phala/src/utils/constants.rs
Original file line number Diff line number Diff line change
@@ -1,21 +1,32 @@
pub const RANDOMNESS_SUBJECT: &[u8] = b"PhalaPoW";

pub const SGX_QUOTE_STATUS_LEVEL_1: &[&str] = &["OK"];
pub const SGX_QUOTE_STATUS_LEVEL_2: &[&str] = &["SW_HARDENING_NEEDED"];
pub const SGX_QUOTE_STATUS_LEVEL_1: &[&str] = &[
// IAS
"OK",
// DCAP
"UpToDate",
];
pub const SGX_QUOTE_STATUS_LEVEL_2: &[&str] = &[
// IAS
"SW_HARDENING_NEEDED",
// DCAP
"SWHardeningNeeded",
];
pub const SGX_QUOTE_STATUS_LEVEL_3: &[&str] = &[
// IAS
"CONFIGURATION_NEEDED",
"CONFIGURATION_AND_SW_HARDENING_NEEDED",
// DCAP
"CONFIG_NEEDED",
"CONFIG_AND_SW_HARDENING_NEEDED",
"ConfigurationNeeded",
"ConfigurationAndSWHardeningNeeded",
];
// LEVEL 4 is LEVEL 3 with advisors which not included in whitelist
pub const SGX_QUOTE_STATUS_LEVEL_5: &[&str] = &[
// IAS
"GROUP_OUT_OF_DATE",
// DCAP
"OUT_OF_DATE"
"OutOfDate",
"OutOfDateConfigurationNeeded",
];
pub const SGX_QUOTE_ADVISORY_ID_WHITELIST: &[&str] = &[
"INTEL-SA-00334",
Expand Down