Skip to content

Commit

Permalink
Correct DCAP constants
Browse files Browse the repository at this point in the history
  • Loading branch information
jasl authored and nanometerzhu committed Dec 23, 2023
1 parent 70985a1 commit 891fb32
Showing 1 changed file with 16 additions and 5 deletions.
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

0 comments on commit 891fb32

Please sign in to comment.