/base/security/huks/test/unittest/huks_lite_test/liteos_m_adapter/ |
D | hks_agreement_test.c | 120 struct HksBlob *agreeKey = NULL; in LITE_TEST_CASE() local 121 ret = TestConstuctBlob(&agreeKey, in LITE_TEST_CASE() 128 ret = AgreeKey(&g_testAgreeParams[0].agreeParamSetParams, privateKey, peerPublicKey, agreeKey); in LITE_TEST_CASE() 144 TestFreeBlob(&agreeKey); in LITE_TEST_CASE() 175 struct HksBlob *agreeKey = NULL; in LITE_TEST_CASE() local 176 ret = TestConstuctBlob(&agreeKey, g_testAgreeParams[0].agreedKeyParams.blobExist, \ in LITE_TEST_CASE() 181 ret = AgreeKey(&g_testAgreeParams[0].agreeParamSetParams, privateKey, peerPublicKey1, agreeKey); in LITE_TEST_CASE() 192 TEST_ASSERT_EQUAL(agreeKey->size, agreeKey1->size); in LITE_TEST_CASE() 193 TEST_ASSERT_TRUE(memcmp(agreeKey->data, agreeKey1->data, agreeKey->size) == 0); in LITE_TEST_CASE() 207 TestFreeBlob(&agreeKey); in LITE_TEST_CASE()
|
/base/security/huks/test/unittest/huks_lite_test/liteos_a_adapter/ |
D | hks_agreement_test.cpp | 117 struct HksBlob *agreeKey = NULL; variable 118 ret = TestConstuctBlob(&agreeKey, 125 ret = AgreeKey(&g_testAgreeParams[0].agreeParamSetParams, privateKey, peerPublicKey, agreeKey); 141 TestFreeBlob(&agreeKey); 170 struct HksBlob *agreeKey = NULL; variable 171 ret = TestConstuctBlob(&agreeKey, g_testAgreeParams[0].agreedKeyParams.blobExist, \ 182 ret = AgreeKey(&g_testAgreeParams[0].agreeParamSetParams, privateKey, peerPublicKey2, agreeKey); 187 EXPECT_EQ(agreeKey->size, agreeKey2->size); 188 EXPECT_EQ(memcmp(agreeKey->data, agreeKey2->data, agreeKey->size), 0); 200 TestFreeBlob(&agreeKey);
|
/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/sdk_test/src/ |
D | hks_agreement_test.cpp | 118 struct HksBlob *agreeKey = NULL; variable 119 ret = TestConstuctBlob(&agreeKey, 126 ret = AgreeKey(&g_testAgreeParams[0].agreeParamSetParams, privateKey, peerPublicKey, agreeKey); 142 TestFreeBlob(&agreeKey);
|
/base/security/huks/test/unittest/huks_standard_test/crypto_engine_test/src/ |
D | hks_crypto_hal_api_openssl.cpp | 496 HksBlob agreeKey = { .size = 0, .data = nullptr }; variable 499 EXPECT_EQ(HksCryptoHalAgreeKey(&key, &pubKey, nullptr, &agreeKey), HKS_ERROR_INVALID_ARGUMENT); 502 EXPECT_EQ(HksCryptoHalAgreeKey(&key, &pubKey, nullptr, &agreeKey), HKS_ERROR_INVALID_ARGUMENT); 505 EXPECT_EQ(HksCryptoHalAgreeKey(&key, &pubKey, nullptr, &agreeKey), HKS_ERROR_INVALID_ARGUMENT); 507 EXPECT_EQ(HksCryptoHalAgreeKey(&key, &pubKey, &spec, &agreeKey), HKS_ERROR_INVALID_ARGUMENT); 509 agreeKey = { .size = 1, .data = buff }; 510 EXPECT_EQ(HksCryptoHalAgreeKey(&key, &pubKey, &spec, &agreeKey), HKS_ERROR_INVALID_ARGUMENT); 529 HksBlob agreeKey = { .size = sizeof(buff), .data = buff }; variable 531 EXPECT_EQ(HksCryptoHalAgreeKey(&key, &pubKey, &spec, &agreeKey), HKS_ERROR_INVALID_ARGUMENT); 534 EXPECT_EQ(HksCryptoHalAgreeKey(&key, &pubKey, &spec, &agreeKey), HKS_ERROR_CRYPTO_ENGINE_ERROR); [all …]
|
/base/security/huks/test/reliability/src/ |
D | api_pressure_test.cpp | 743 …HksBlob agreeKey = { .size = HKS_ECC_KEY_SIZE_224, .data = (uint8_t *)HksMalloc(HKS_ECC_KEY_SIZE_2… in AgreeKeyTest() local 744 ASSERT_NE(agreeKey.data, nullptr); in AgreeKeyTest() 745 EXPECT_EQ(HksAgreeKey(paramInSet, authId, &pubKey, &agreeKey), HKS_SUCCESS); in AgreeKeyTest() 746 HksFree(agreeKey.data); in AgreeKeyTest() 908 HksBlob agreeKey = { .size = TEST_KEY_SIZE, .data = (uint8_t *)HksMalloc(TEST_KEY_SIZE) }; in AgreeScene() local 909 ASSERT_NE(agreeKey.data, nullptr); in AgreeScene() 910 EXPECT_EQ(HksAgreeKey(agreeKeyParam, &authId, &pubKey, &agreeKey), HKS_SUCCESS); in AgreeScene() 912 HksFree(agreeKey.data); in AgreeScene()
|
D | pressure_test.cpp | 723 …HksBlob agreeKey = { .size = HKS_ECC_KEY_SIZE_224, .data = (uint8_t *)HksMalloc(HKS_ECC_KEY_SIZE_2… variable 724 ASSERT_NE(agreeKey.data, nullptr); 726 int32_t ret = HksAgreeKey(paramInSet, &authId, &pubKey, &agreeKey); 731 HksFree(agreeKey.data); 1209 …HksBlob agreeKey = { .size = HKS_ECC_KEY_SIZE_224, .data = (uint8_t *)HksMalloc(HKS_ECC_KEY_SIZE_2… variable 1210 ASSERT_NE(agreeKey.data, nullptr); 1212 int32_t ret = HksAgreeKey(paramInSet, &priKey, &pubKey, &agreeKey); 1217 HksFree(agreeKey.data);
|
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/ |
D | hks_import_agree_test.cpp | 1109 …stAgree(const struct HksBlob *keyAlias, const struct HksBlob *peerPubKey, struct HksBlob *agreeKey) in TestAgree() argument 1135 ret = HksFinish(&handle, finishParamSet, &tmpInBlob, agreeKey); in TestAgree()
|