Skip to content

Commit 891fb32

Browse files
jaslnanometerzhu
authored andcommitted
Correct DCAP constants
1 parent 70985a1 commit 891fb32

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

pallets/phala/src/utils/constants.rs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,32 @@
11
pub const RANDOMNESS_SUBJECT: &[u8] = b"PhalaPoW";
22

3-
pub const SGX_QUOTE_STATUS_LEVEL_1: &[&str] = &["OK"];
4-
pub const SGX_QUOTE_STATUS_LEVEL_2: &[&str] = &["SW_HARDENING_NEEDED"];
3+
pub const SGX_QUOTE_STATUS_LEVEL_1: &[&str] = &[
4+
// IAS
5+
"OK",
6+
// DCAP
7+
"UpToDate",
8+
];
9+
pub const SGX_QUOTE_STATUS_LEVEL_2: &[&str] = &[
10+
// IAS
11+
"SW_HARDENING_NEEDED",
12+
// DCAP
13+
"SWHardeningNeeded",
14+
];
515
pub const SGX_QUOTE_STATUS_LEVEL_3: &[&str] = &[
616
// IAS
717
"CONFIGURATION_NEEDED",
818
"CONFIGURATION_AND_SW_HARDENING_NEEDED",
919
// DCAP
10-
"CONFIG_NEEDED",
11-
"CONFIG_AND_SW_HARDENING_NEEDED",
20+
"ConfigurationNeeded",
21+
"ConfigurationAndSWHardeningNeeded",
1222
];
1323
// LEVEL 4 is LEVEL 3 with advisors which not included in whitelist
1424
pub const SGX_QUOTE_STATUS_LEVEL_5: &[&str] = &[
1525
// IAS
1626
"GROUP_OUT_OF_DATE",
1727
// DCAP
18-
"OUT_OF_DATE"
28+
"OutOfDate",
29+
"OutOfDateConfigurationNeeded",
1930
];
2031
pub const SGX_QUOTE_ADVISORY_ID_WHITELIST: &[&str] = &[
2132
"INTEL-SA-00334",

0 commit comments

Comments
 (0)