/base/security/certificate_framework/frameworks/core/param/src/ |
D | cf_param.c | 46 (*paramSet)->paramSetSize = sizeof(CfParamSet); in CfInitParamSet() 53 (paramSet->paramSetSize != size) || in CfCheckParamSet() 63 int32_t ret = CfCheckParamSet(paramSet, paramSet->paramSetSize); in CfFreshParamSet() 69 uint32_t size = paramSet->paramSetSize; in CfFreshParamSet() 93 if (paramSet->paramSetSize != offset) { in CfFreshParamSet() 103 uint32_t size = freshParamSet->paramSetSize; in BuildParamSet() 130 int ret = CfCheckParamSet(*paramSet, (*paramSet)->paramSetSize); in CfBuildParamSet() 155 if (CfCheckParamSet(paramSet, paramSet->paramSetSize) != CF_SUCCESS) { in CfGetParam() 173 … if ((params == NULL) || (paramSet == NULL) || (paramSet->paramSetSize > CF_PARAM_SET_MAX_SIZE) || in CheckBeforeAddParams() 197 if (paramSet->paramSetSize > CF_PARAM_SET_MAX_SIZE) { in CfAddParams() [all …]
|
/base/security/certificate_manager/frameworks/cert_manager_standard/main/common/src/ |
D | cm_param.c | 44 (*paramSet)->paramSetSize = sizeof(struct CmParamSet); in CmInitParamSet() 55 (paramSet->paramSetSize != size) || in CmCheckParamSet() 69 int32_t ret = CmCheckParamSet(paramSet, paramSet->paramSetSize); in CmFreshParamSet() 75 uint32_t size = paramSet->paramSetSize; in CmFreshParamSet() 99 if (paramSet->paramSetSize != offset) { in CmFreshParamSet() 109 uint32_t size = freshParamSet->paramSetSize; in BuildParamSet() 136 int ret = CmCheckParamSet(*paramSet, (*paramSet)->paramSetSize); in CmBuildParamSet() 161 if (CmCheckParamSet(paramSet, paramSet->paramSetSize) != CM_SUCCESS) { in CmGetParam() 178 uint32_t size = paramSet->paramSetSize; in FreshParamSet() 201 if (paramSet->paramSetSize != offset) { in FreshParamSet() [all …]
|
/base/security/huks/services/huks_standard/huks_service/main/core/src/ |
D | hks_client_service_util.c | 39 if (paramSet->paramSetSize < tmpParamSet->paramSetSize) { in GetKeyParamSet() 43 if (memcpy_s(paramSet, paramSet->paramSetSize, tmpParamSet, tmpParamSet->paramSetSize) != EOK) { in GetKeyParamSet() 71 if (paramSet->paramSetSize < outParamSet->paramSetSize) { in GetKeyParamSet() 75 (void)memcpy_s(paramSet, paramSet->paramSetSize, outParamSet, outParamSet->paramSetSize); in GetKeyParamSet()
|
/base/security/huks/frameworks/huks_standard/main/os_dependency/ipc/src/ |
D | hks_ipc_check.c | 35 … ((sizeof(keyAlias->size) + ALIGN_SIZE(keyAlias->size) + ALIGN_SIZE(paramSetIn->paramSetSize) + in HksCheckIpcGenerateKey() 53 if ((sizeof(keyAlias->size) + ALIGN_SIZE(keyAlias->size) + ALIGN_SIZE(paramSet->paramSetSize) + in HksCheckIpcImportKey() 72 …wrappingKeyAlias->size) + ALIGN_SIZE(wrappingKeyAlias->size) + ALIGN_SIZE(paramSet->paramSetSize) + in HksCheckIpcImportWrappedKey() 97 if (paramSet->paramSetSize == 0) { in HksCheckIpcGetKeyParamSet() 100 …if ((sizeof(keyAlias->size) + ALIGN_SIZE(keyAlias->size) + sizeof(paramSet->paramSetSize)) > MAX_P… in HksCheckIpcGetKeyParamSet() 115 …if ((ALIGN_SIZE(paramSet->paramSetSize) + sizeof(privateKey->size) + ALIGN_SIZE(privateKey->size) + in HksCheckIpcAgreeKey() 131 if ((ALIGN_SIZE(paramSet->paramSetSize) + sizeof(mainKey->size) + ALIGN_SIZE(mainKey->size) + in HksCheckIpcDeriveKey() 145 (keyInfoList[i].paramSet == NULL) || (keyInfoList[i].paramSet->paramSetSize == 0)) { in HksCheckIpcGetKeyInfoList() 157 (IsAdditionOverflow(keyInfoList[i].paramSet->paramSetSize, DEFAULT_ALIGN_MASK_SIZE))) { in HksCheckIpcGetKeyInfoList() 164 if (IsAdditionOverflow(keyInfoBufSize, ALIGN_SIZE(keyInfoList[i].paramSet->paramSetSize))) { in HksCheckIpcGetKeyInfoList() [all …]
|
D | hks_client_service_ipc.c | 79 …size = sizeof(keyAlias->size) + ALIGN_SIZE(keyAlias->size) + ALIGN_SIZE(paramSetIn->paramSetSize) + in HksClientGenerateKey() 84 outBlob.size = paramSetOut->paramSetSize; in HksClientGenerateKey() 112 …b.size = sizeof(keyAlias->size) + ALIGN_SIZE(keyAlias->size) + ALIGN_SIZE(paramSet->paramSetSize) + in HksClientImportKey() 159 ALIGN_SIZE(paramSet->paramSetSize) + in HksClientImportWrappedKey() 191 struct HksBlob outBlob = { paramSetOut->paramSetSize, (uint8_t *)paramSetOut }; in HksClientGetKeyParamSet() 192 …lob.size = sizeof(keyAlias->size) + ALIGN_SIZE(keyAlias->size) + sizeof(paramSetOut->paramSetSize); in HksClientGetKeyParamSet() 392 …inBlob.size = ALIGN_SIZE(paramSet->paramSetSize) + sizeof(privateKey->size) + ALIGN_SIZE(privateKe… in HksClientAgreeKey() 415 …inBlob.size = ALIGN_SIZE(paramSet->paramSetSize) + sizeof(mainKey->size) + ALIGN_SIZE(mainKey->siz… in HksClientDeriveKey() 455 sizeof(keyInfoList->paramSet->paramSetSize)) * (*listCount); in HksClientGetKeyInfoList() 463 ALIGN_SIZE(keyInfoList[i].paramSet->paramSetSize); in HksClientGetKeyInfoList() [all …]
|
D | hks_ipc_serialization.c | 63 …tOffset > destBlob->size) || (destBlob->size - *destOffset < ALIGN_SIZE(paramSet->paramSetSize))) { in CopyParamSetToBuffer() 67 …py_s(destBlob->data + *destOffset, destBlob->size - *destOffset, paramSet, paramSet->paramSetSize); in CopyParamSetToBuffer() 68 *destOffset += ALIGN_SIZE(paramSet->paramSetSize); in CopyParamSetToBuffer() 113 if (IsAdditionOverflow((*paramSet)->paramSetSize, DEFAULT_ALIGN_MASK_SIZE)) { in GetParamSetFromBuffer() 116 if (ALIGN_SIZE((*paramSet)->paramSetSize) > (srcBlob->size - *srcOffset)) { in GetParamSetFromBuffer() 119 *srcOffset += ALIGN_SIZE((*paramSet)->paramSetSize); in GetParamSetFromBuffer() 242 ret = CopyUint32ToBuffer(keyInfoList[i].paramSet->paramSetSize, destData, &offset); in HksGetKeyInfoListPack() 277 if (memcpy_s(keyInfoList[i].paramSet, keyInfoList[i].paramSet->paramSetSize, in HksGetKeyInfoListUnpackFromService() 278 paramSet, paramSet->paramSetSize) != EOK) { in HksGetKeyInfoListUnpackFromService()
|
/base/security/huks/frameworks/huks_standard/main/common/src/ |
D | hks_param.c | 174 … if ((params == NULL) || (paramSet == NULL) || (paramSet->paramSetSize > HKS_PARAM_SET_MAX_SIZE) || in CheckBeforeAddParams() 193 uint32_t size = freshParamSet->paramSetSize; in BuildParamSet() 218 (paramSet->paramSetSize != size) || in HksCheckParamSet() 234 (*paramSet)->paramSetSize = sizeof(struct HksParamSet); in HksInitParamSet() 245 paramSet->paramSetSize += sizeof(struct HksParam); in HksAddParams() 247 if (IsAdditionOverflow(paramSet->paramSetSize, params[i].blob.size)) { in HksAddParams() 249 paramSet->paramSetSize -= sizeof(struct HksParam); in HksAddParams() 252 paramSet->paramSetSize += params[i].blob.size; in HksAddParams() 266 int ret = HksCheckParamSet(*paramSet, (*paramSet)->paramSetSize); in HksBuildParamSet() 283 uint32_t size = paramSet->paramSetSize; in FreshParamSet() [all …]
|
/base/security/huks/test/fuzz_test/innerapi_fuzzer/hksgetkeyparamset_fuzzer/ |
D | hksgetkeyparamset_fuzzer.cpp | 46 paramSetIn->paramSetSize = paramSize; in DoSomethingInterestingWithMyAPI() 49 paramSetOut->paramSetSize = paramSize; in DoSomethingInterestingWithMyAPI()
|
/base/security/certificate_manager/test/unittest/module_test/src/ |
D | cm_param_test.cpp | 365 paramSet->paramSetSize = sizeof(struct CmParamSet) - 1; 390 paramSet->paramSetSize += sizeof(struct CmParam); 418 paramSet->paramSetSize += sizeof(struct CmParam) + sizeof(tempBuf); 446 paramSet->paramSetSize += sizeof(struct CmParam) + sizeof(tempBuf) + 1; /* invalid size */ 485 int32_t ret = CmGetParamSet(paramSet, paramSet->paramSetSize, &outParamSet); 509 paramSet->paramSetSize += sizeof(struct CmParam); 515 ret = CmGetParamSet(paramSet, paramSet->paramSetSize, &outParamSet); 539 paramSet->paramSetSize += sizeof(struct CmParam) + sizeof(tempBuf) + 1; /* invalid size */ 545 ret = CmGetParamSet(paramSet, paramSet->paramSetSize, &outParamSet); 569 paramSet->paramSetSize += sizeof(struct CmParam) + sizeof(tempBuf); [all …]
|
/base/security/huks/test/unittest/huks_standard_test/module_test/framework_test/common_test/src/ |
D | hks_param_test.cpp | 198 paramSet->paramSetSize = 0; 218 ret = HksGetParamSet(paramSet, paramSet->paramSetSize, nullptr); 259 paramSet->paramSetSize = 0; 314 paramSet->paramSetSize = 0; 345 paramSet->paramSetSize = 0; 385 struct HksParamSet paramSet = { .paramSetSize = 0, .paramsCnt = exceedCnt, .params = {} };
|
/base/security/huks/test/unittest/huks_standard_test/module_test/service_test/huks_service/core/src/ |
D | hks_client_service_test.cpp | 444 paramSet->paramSetSize = g_paramSetDefaultSize; 583 key.data = (uint8_t *)HksMalloc(paramSet->paramSetSize); 584 (void)memcpy_s(key.data, paramSet->paramSetSize, paramSet, paramSet->paramSetSize); 609 key.data = (uint8_t *)HksMalloc(paramSet->paramSetSize); 610 (void)memcpy_s(key.data, paramSet->paramSetSize, paramSet, paramSet->paramSetSize); 636 key.data = (uint8_t *)HksMalloc(paramSet->paramSetSize); 637 (void)memcpy_s(key.data, paramSet->paramSetSize, paramSet, paramSet->paramSetSize);
|
/base/security/huks/test/fuzz_test/innerapi_fuzzer/hksdeletekey_fuzzer/ |
D | hksdeletekey_fuzzer.cpp | 38 paramSetIn->paramSetSize = size - BLOB_SIZE; in DoSomethingInterestingWithMyAPI()
|
/base/security/huks/test/fuzz_test/innerapi_fuzzer/hksabort_fuzzer/ |
D | hksabort_fuzzer.cpp | 42 paramSet->paramSetSize = size - BLOB_SIZE; in DoSomethingInterestingWithMyAPI()
|
/base/security/huks/test/fuzz_test/innerapi_fuzzer/hkskeyexist_fuzzer/ |
D | hkskeyexist_fuzzer.cpp | 41 paramSetIn->paramSetSize = size - BLOB_SIZE; in DoSomethingInterestingWithMyAPI()
|
/base/security/huks/test/fuzz_test/innerapi_fuzzer/hksgeneratekey_fuzzer/ |
D | hksgeneratekey_fuzzer.cpp | 43 paramSetIn->paramSetSize = size - BLOB_SIZE; in DoSomethingInterestingWithMyAPI()
|
/base/security/huks/test/fuzz_test/innerapi_fuzzer/hksexportpublickey_fuzzer/ |
D | hksexportpublickey_fuzzer.cpp | 45 paramSet->paramSetSize = size - DOUBLE_BLOB_SIZE; in DoSomethingInterestingWithMyAPI()
|
/base/security/huks/test/fuzz_test/innerapi_fuzzer/hksinit_fuzzer/ |
D | hksinit_fuzzer.cpp | 45 paramSet->paramSetSize = size - DOUBLE_BLOB_SIZE; in DoSomethingInterestingWithMyAPI()
|
/base/security/huks/test/fuzz_test/innerapi_fuzzer/hksimportkey_fuzzer/ |
D | hksimportkey_fuzzer.cpp | 45 paramSet->paramSetSize = size - DOUBLE_BLOB_SIZE; in DoSomethingInterestingWithMyAPI()
|
/base/security/huks/test/fuzz_test/innerapi_fuzzer/hkshash_fuzzer/ |
D | hkshash_fuzzer.cpp | 45 paramSet->paramSetSize = size - DOUBLE_BLOB_SIZE; in DoSomethingInterestingWithMyAPI()
|
/base/security/certificate_framework/test/unittest/cf_sdk_test/src/ |
D | cf_param_test.cpp | 213 paramSet->paramSetSize = CF_PARAM_SET_MAX_SIZE - 1; /* after add sizeof(tempBuf) invalid */ 424 paramSet->paramSetSize = sizeof(CfParamSet) - 1; 449 paramSet->paramSetSize += sizeof(CfParam); 477 paramSet->paramSetSize += sizeof(CfParam) + sizeof(tempBuf); 505 paramSet->paramSetSize += sizeof(CfParam) + sizeof(tempBuf) + 1; /* invalid size */
|
/base/security/huks/services/huks_standard/huks_service/main/os_dependency/ca/ |
D | hks_teec.c | 324 InitializeBlob(¶ms[1].blob, paramSetIn->paramSetSize, (uint8_t *)paramSetIn); in HksTeeGenerateKey() 341 InitializeBlob(¶ms[0].blob, paramSet->paramSetSize, (uint8_t *)paramSet); in HksTeeCheckKeyLegality() 355 InitializeBlob(¶ms[0].blob, paramSet->paramSetSize, (uint8_t *)paramSet); in HksTeeGenerateRandom() 371 InitializeBlob(¶ms[1].blob, paramSet->paramSetSize, (uint8_t *)paramSet); in HksTeeImportKey() 390 InitializeBlob(¶ms[1].blob, paramSet->paramSetSize, (uint8_t *)paramSet); in HksTeeExportPublicKey() 408 InitializeBlob(¶ms[0].blob, paramSet->paramSetSize, (uint8_t *)paramSet); in HksTeeAgreeKey() 427 InitializeBlob(¶ms[0].blob, paramSet->paramSetSize, (uint8_t *)paramSet); in HksTeeDeriveKey() 447 InitializeBlob(¶ms[1].blob, paramSet->paramSetSize, (uint8_t *)paramSet); in HksTeeAttestKey() 471 InitializeBlob(¶ms[1].blob, paramSet->paramSetSize, (uint8_t *)paramSet); in ProcessInit() 533 InitializeBlob(¶ms[1].blob, paramSet->paramSetSize, (uint8_t *)paramSet); in ProcessOnce()
|
/base/security/huks/test/fuzz_test/innerapi_fuzzer/hksupdate_fuzzer/ |
D | hksupdate_fuzzer.cpp | 48 paramSet->paramSetSize = size - TRIPLE_BLOB_SIZE; in DoSomethingInterestingWithMyAPI()
|
/base/security/huks/test/fuzz_test/innerapi_fuzzer/hksimportwrappedkey_fuzzer/ |
D | hksimportwrappedkey_fuzzer.cpp | 48 paramSet->paramSetSize = size - TRIPLE_BLOB_SIZE; in DoSomethingInterestingWithMyAPI()
|
/base/security/huks/test/fuzz_test/innerapi_fuzzer/hksfinish_fuzzer/ |
D | hksfinish_fuzzer.cpp | 47 paramSet->paramSetSize = size - TRIPLE_BLOB_SIZE; in DoSomethingInterestingWithMyAPI()
|
/base/security/huks/services/huks_standard/huks_service/main/os_dependency/idl/ipc/ |
D | hks_ipc_serialization.c | 60 …tOffset > destBlob->size) || (destBlob->size - *destOffset < ALIGN_SIZE(paramSet->paramSetSize))) { in CopyParamSetToBuffer() 64 …py_s(destBlob->data + *destOffset, destBlob->size - *destOffset, paramSet, paramSet->paramSetSize); in CopyParamSetToBuffer() 66 *destOffset += ALIGN_SIZE(paramSet->paramSetSize); in CopyParamSetToBuffer() 111 if (IsAdditionOverflow((*paramSet)->paramSetSize, DEFAULT_ALIGN_MASK_SIZE)) { in GetParamSetFromBuffer() 114 if (ALIGN_SIZE((*paramSet)->paramSetSize) > (srcBlob->size - *srcOffset) || in GetParamSetFromBuffer() 119 *srcOffset += ALIGN_SIZE((*paramSet)->paramSetSize); in GetParamSetFromBuffer() 168 (*paramSet)->paramSetSize = paramSetOutSize; in MallocParamSetFromBuffer()
|