Skip to content

Commit

Permalink
Renamed OID name of ...platform_id to ...platform_type
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenghaven committed Jun 19, 2024
1 parent 1c7771b commit a99fadc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion contracts/Constants.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ library OIDs {
// Root OIDs
bytes32 constant OID_DECENT_EXT_VER =
0x6982f5c89a94ffdfaaab8591c1b5f7c2f782b01e010000000000000000000000;
bytes32 constant OID_DECENT_PLATFORM_ID =
bytes32 constant OID_DECENT_PLATFORM_TYPE =
0x6982f5c89a94ffdfaaab8591c1b5f7c2f782b01e020000000000000000000000;
bytes32 constant OID_DECENT_HASHED_KEYS =
0x6982f5c89a94ffdfaaab8591c1b5f7c2f782b01e040000000000000000000000;
Expand Down
2 changes: 1 addition & 1 deletion contracts/DecentAppCert.sol
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ library DecentAppCert {
X509Extension.ExtEntry[] memory extEntries =
new X509Extension.ExtEntry[](5);
extEntries[0].extnID = OIDs.OID_DECENT_EXT_VER;
extEntries[1].extnID = OIDs.OID_DECENT_PLATFORM_ID;
extEntries[1].extnID = OIDs.OID_DECENT_PLATFORM_TYPE;
extEntries[2].extnID = OIDs.OID_DECENT_APP_HASH;
extEntries[3].extnID = OIDs.OID_DECENT_AUTH_LIST;

Expand Down
4 changes: 2 additions & 2 deletions contracts/DecentServerCert.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ library DecentServerCert {
bool isVerified;
address serverKeyAddr;
bytes32 enclaveHash;
bytes32 platformId;
bytes32 platformId; // the fingerprint of the platform
}

//===== functions =====
Expand Down Expand Up @@ -272,7 +272,7 @@ library DecentServerCert {
X509Extension.ExtEntry[] memory extEntries =
new X509Extension.ExtEntry[](5);
extEntries[0].extnID = OIDs.OID_DECENT_EXT_VER;
extEntries[1].extnID = OIDs.OID_DECENT_PLATFORM_ID;
extEntries[1].extnID = OIDs.OID_DECENT_PLATFORM_TYPE;
extEntries[2].extnID = OIDs.OID_DECENT_HASHED_KEYS;
extEntries[3].extnID = OIDs.OID_DECENT_STD_REP_DATA;
extEntries[4].extnID = OIDs.OID_DECENT_ATTESTATION;
Expand Down
6 changes: 3 additions & 3 deletions tests/DecentCommon/04_X509Extension.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ contract X509Extension_proxy {
new X509Extension.ExtEntry[](3);

extEntries[0].extnID = OIDs.OID_DECENT_EXT_VER;
extEntries[1].extnID = OIDs.OID_DECENT_PLATFORM_ID;
extEntries[1].extnID = OIDs.OID_DECENT_PLATFORM_TYPE;
extEntries[2].extnID = OIDs.OID_DECENT_HASHED_KEYS;

uint256 idx;
Expand All @@ -33,7 +33,7 @@ contract X509Extension_proxy {
Assert.equal(idx, 2, "wrong index");

idx = X509Extension.findIdxOfExtEntry(
OIDs.OID_DECENT_PLATFORM_ID,
OIDs.OID_DECENT_PLATFORM_TYPE,
extEntries
);
Assert.equal(idx, 1, "wrong index");
Expand Down Expand Up @@ -62,7 +62,7 @@ contract X509Extension_proxy {
new X509Extension.ExtEntry[](3);

extEntries[0].extnID = OIDs.OID_DECENT_EXT_VER;
extEntries[1].extnID = OIDs.OID_DECENT_PLATFORM_ID;
extEntries[1].extnID = OIDs.OID_DECENT_PLATFORM_TYPE;
extEntries[2].extnID = OIDs.OID_NAME_CN;

bytes memory certDer = TestCerts.DECENT_SVR_CERT_DER;
Expand Down

0 comments on commit a99fadc

Please sign in to comment.