From a99fadcd7d07e3cfe05ac4197229f001a87bdbab Mon Sep 17 00:00:00 2001 From: Haofan Zheng Date: Wed, 19 Jun 2024 01:09:30 -0700 Subject: [PATCH] Renamed OID name of ...platform_id to ...platform_type --- contracts/Constants.sol | 2 +- contracts/DecentAppCert.sol | 2 +- contracts/DecentServerCert.sol | 4 ++-- tests/DecentCommon/04_X509Extension.sol | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/contracts/Constants.sol b/contracts/Constants.sol index 4f4be52..d220789 100644 --- a/contracts/Constants.sol +++ b/contracts/Constants.sol @@ -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; diff --git a/contracts/DecentAppCert.sol b/contracts/DecentAppCert.sol index 0922b4f..51bbee8 100644 --- a/contracts/DecentAppCert.sol +++ b/contracts/DecentAppCert.sol @@ -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; diff --git a/contracts/DecentServerCert.sol b/contracts/DecentServerCert.sol index 6ad910a..b7b87d4 100644 --- a/contracts/DecentServerCert.sol +++ b/contracts/DecentServerCert.sol @@ -35,7 +35,7 @@ library DecentServerCert { bool isVerified; address serverKeyAddr; bytes32 enclaveHash; - bytes32 platformId; + bytes32 platformId; // the fingerprint of the platform } //===== functions ===== @@ -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; diff --git a/tests/DecentCommon/04_X509Extension.sol b/tests/DecentCommon/04_X509Extension.sol index ad82dda..9cbb7cc 100644 --- a/tests/DecentCommon/04_X509Extension.sol +++ b/tests/DecentCommon/04_X509Extension.sol @@ -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; @@ -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"); @@ -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;