未验证 提交 ea553046 编写于 作者: O openharmony_ci 提交者: Gitee

!6506 去除冗余/标废弃未使用的tag

Merge pull request !6506 from zhao_zhen_zhou/cherry-pick-1668499247
......@@ -167,7 +167,6 @@ namespace Unittest::HuksMisc
ASSERT_EQ((uint32_t)OH_HUKS_CHALLENGE_POS_2 == 2, true);
ASSERT_EQ((uint32_t)OH_HUKS_CHALLENGE_POS_3 == 3, true);
ASSERT_EQ((uint32_t)OH_HUKS_SECURE_SIGN_WITH_AUTHINFO == 1, true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_INVALID == (OH_HUKS_TAG_TYPE_INVALID | 0), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_ALGORITHM == (OH_HUKS_TAG_TYPE_UINT | 1), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_PURPOSE == (OH_HUKS_TAG_TYPE_UINT | 2), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_KEY_SIZE == (OH_HUKS_TAG_TYPE_UINT | 3), true);
......@@ -180,12 +179,8 @@ namespace Unittest::HuksMisc
ASSERT_EQ((uint32_t)OH_HUKS_TAG_IV == (OH_HUKS_TAG_TYPE_BYTES | 10), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_INFO == (OH_HUKS_TAG_TYPE_BYTES | 11), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_SALT == (OH_HUKS_TAG_TYPE_BYTES | 12), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_PWD == (OH_HUKS_TAG_TYPE_BYTES | 13), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_ITERATION == (OH_HUKS_TAG_TYPE_UINT | 14), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_KEY_GENERATE_TYPE == (OH_HUKS_TAG_TYPE_UINT | 15), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_DERIVE_MAIN_KEY == (OH_HUKS_TAG_TYPE_BYTES | 16), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_DERIVE_FACTOR == (OH_HUKS_TAG_TYPE_BYTES | 17), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_DERIVE_ALG == (OH_HUKS_TAG_TYPE_UINT | 18), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_AGREE_ALG == (OH_HUKS_TAG_TYPE_UINT | 19), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_AGREE_PUBLIC_KEY_IS_KEY_ALIAS == (OH_HUKS_TAG_TYPE_BOOL | 20), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_AGREE_PRIVATE_KEY_ALIAS == (OH_HUKS_TAG_TYPE_BYTES | 21), true);
......@@ -207,17 +202,7 @@ namespace Unittest::HuksMisc
ASSERT_EQ((uint32_t)OH_HUKS_TAG_ATTESTATION_CHALLENGE == (OH_HUKS_TAG_TYPE_BYTES | 501), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_ATTESTATION_APPLICATION_ID == (OH_HUKS_TAG_TYPE_BYTES | 502), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_ATTESTATION_ID_BRAND == (OH_HUKS_TAG_TYPE_BYTES | 503), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_ATTESTATION_ID_DEVICE == (OH_HUKS_TAG_TYPE_BYTES | 504), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_ATTESTATION_ID_PRODUCT == (OH_HUKS_TAG_TYPE_BYTES | 505), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_ATTESTATION_ID_SERIAL == (OH_HUKS_TAG_TYPE_BYTES | 506), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_ATTESTATION_ID_IMEI == (OH_HUKS_TAG_TYPE_BYTES | 507), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_ATTESTATION_ID_MEID == (OH_HUKS_TAG_TYPE_BYTES | 508), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_ATTESTATION_ID_MANUFACTURER == (OH_HUKS_TAG_TYPE_BYTES | 509), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_ATTESTATION_ID_MODEL == (OH_HUKS_TAG_TYPE_BYTES | 510), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_ATTESTATION_ID_ALIAS == (OH_HUKS_TAG_TYPE_BYTES | 511), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_ATTESTATION_ID_SOCID == (OH_HUKS_TAG_TYPE_BYTES | 512), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_ATTESTATION_ID_UDID == (OH_HUKS_TAG_TYPE_BYTES | 513), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_ATTESTATION_ID_SEC_LEVEL_INFO == (OH_HUKS_TAG_TYPE_BYTES | 514), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_ATTESTATION_ID_VERSION_INFO == (OH_HUKS_TAG_TYPE_BYTES | 515), true);
......@@ -229,8 +214,6 @@ namespace Unittest::HuksMisc
ASSERT_EQ((uint32_t)OH_HUKS_TAG_KEY_ROLE == (OH_HUKS_TAG_TYPE_UINT | 1006), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_KEY_FLAG == (OH_HUKS_TAG_TYPE_UINT | 1007), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_IS_ASYNCHRONIZED == (OH_HUKS_TAG_TYPE_UINT | 1008), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_SECURE_KEY_ALIAS == (OH_HUKS_TAG_TYPE_BOOL | 1009), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_SECURE_KEY_UUID == (OH_HUKS_TAG_TYPE_BYTES | 1010), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_KEY_DOMAIN == (OH_HUKS_TAG_TYPE_UINT | 1011), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_SYMMETRIC_KEY_DATA == (OH_HUKS_TAG_TYPE_BYTES | 20001), true);
ASSERT_EQ((uint32_t)OH_HUKS_TAG_ASYMMETRIC_PUBLIC_KEY_DATA == (OH_HUKS_TAG_TYPE_BYTES | 20002), true);
......@@ -310,4 +293,4 @@ namespace Unittest::HuksMisc
ASSERT_EQ(sizeof(keyMaterial25519.priKeySize) == sizeof(uint32_t), true);
ASSERT_EQ(sizeof(keyMaterial25519.reserved) == sizeof(uint32_t), true);
}
}
\ No newline at end of file
}
......@@ -82,8 +82,8 @@ HWTEST_F(HuksNullptrTest, Security_HUKS_NAPI_nullptr_0100, TestSize.Level0)
ret=OH_Huks_IsParamSetValid(paramSetNullptr,0);
EXPECT_NE(ret.errorCode, OH_HUKS_SUCCESS) << "this case failed.";
struct OH_Huks_Param baseParam = { .tag = OH_HUKS_TAG_INVALID, .uint64Param = (uint64_t)1 };
struct OH_Huks_Param otherParam = { .tag = OH_HUKS_TAG_INVALID, .uint64Param = (uint64_t)2 };
struct OH_Huks_Param baseParam = { .tag = OH_HUKS_TAG_ALGORITHM, .uint64Param = (uint64_t)1 };
struct OH_Huks_Param otherParam = { .tag = OH_HUKS_TAG_ALGORITHM, .uint64Param = (uint64_t)2 };
ret=OH_Huks_CheckParamMatch(&baseParam,&otherParam);
EXPECT_NE(ret.errorCode, OH_HUKS_SUCCESS) << "this case failed.";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册