Home
last modified time | relevance | path

Searched refs:paramSetSize (Results 1 – 25 of 84) sorted by relevance

1234

/base/security/certificate_framework/frameworks/core/param/src/
Dcf_param.c46 (*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/
Dcm_param.c44 (*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/
Dhks_client_service_util.c39 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/
Dhks_ipc_check.c35 … ((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 …]
Dhks_client_service_ipc.c79 …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 …]
Dhks_ipc_serialization.c63 …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/
Dhks_param.c174 … 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/
Dhksgetkeyparamset_fuzzer.cpp46 paramSetIn->paramSetSize = paramSize; in DoSomethingInterestingWithMyAPI()
49 paramSetOut->paramSetSize = paramSize; in DoSomethingInterestingWithMyAPI()
/base/security/certificate_manager/test/unittest/module_test/src/
Dcm_param_test.cpp365 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/
Dhks_param_test.cpp198 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/
Dhks_client_service_test.cpp444 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/
Dhksdeletekey_fuzzer.cpp38 paramSetIn->paramSetSize = size - BLOB_SIZE; in DoSomethingInterestingWithMyAPI()
/base/security/huks/test/fuzz_test/innerapi_fuzzer/hksabort_fuzzer/
Dhksabort_fuzzer.cpp42 paramSet->paramSetSize = size - BLOB_SIZE; in DoSomethingInterestingWithMyAPI()
/base/security/huks/test/fuzz_test/innerapi_fuzzer/hkskeyexist_fuzzer/
Dhkskeyexist_fuzzer.cpp41 paramSetIn->paramSetSize = size - BLOB_SIZE; in DoSomethingInterestingWithMyAPI()
/base/security/huks/test/fuzz_test/innerapi_fuzzer/hksgeneratekey_fuzzer/
Dhksgeneratekey_fuzzer.cpp43 paramSetIn->paramSetSize = size - BLOB_SIZE; in DoSomethingInterestingWithMyAPI()
/base/security/huks/test/fuzz_test/innerapi_fuzzer/hksexportpublickey_fuzzer/
Dhksexportpublickey_fuzzer.cpp45 paramSet->paramSetSize = size - DOUBLE_BLOB_SIZE; in DoSomethingInterestingWithMyAPI()
/base/security/huks/test/fuzz_test/innerapi_fuzzer/hksinit_fuzzer/
Dhksinit_fuzzer.cpp45 paramSet->paramSetSize = size - DOUBLE_BLOB_SIZE; in DoSomethingInterestingWithMyAPI()
/base/security/huks/test/fuzz_test/innerapi_fuzzer/hksimportkey_fuzzer/
Dhksimportkey_fuzzer.cpp45 paramSet->paramSetSize = size - DOUBLE_BLOB_SIZE; in DoSomethingInterestingWithMyAPI()
/base/security/huks/test/fuzz_test/innerapi_fuzzer/hkshash_fuzzer/
Dhkshash_fuzzer.cpp45 paramSet->paramSetSize = size - DOUBLE_BLOB_SIZE; in DoSomethingInterestingWithMyAPI()
/base/security/certificate_framework/test/unittest/cf_sdk_test/src/
Dcf_param_test.cpp213 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/
Dhks_teec.c324 InitializeBlob(&params[1].blob, paramSetIn->paramSetSize, (uint8_t *)paramSetIn); in HksTeeGenerateKey()
341 InitializeBlob(&params[0].blob, paramSet->paramSetSize, (uint8_t *)paramSet); in HksTeeCheckKeyLegality()
355 InitializeBlob(&params[0].blob, paramSet->paramSetSize, (uint8_t *)paramSet); in HksTeeGenerateRandom()
371 InitializeBlob(&params[1].blob, paramSet->paramSetSize, (uint8_t *)paramSet); in HksTeeImportKey()
390 InitializeBlob(&params[1].blob, paramSet->paramSetSize, (uint8_t *)paramSet); in HksTeeExportPublicKey()
408 InitializeBlob(&params[0].blob, paramSet->paramSetSize, (uint8_t *)paramSet); in HksTeeAgreeKey()
427 InitializeBlob(&params[0].blob, paramSet->paramSetSize, (uint8_t *)paramSet); in HksTeeDeriveKey()
447 InitializeBlob(&params[1].blob, paramSet->paramSetSize, (uint8_t *)paramSet); in HksTeeAttestKey()
471 InitializeBlob(&params[1].blob, paramSet->paramSetSize, (uint8_t *)paramSet); in ProcessInit()
533 InitializeBlob(&params[1].blob, paramSet->paramSetSize, (uint8_t *)paramSet); in ProcessOnce()
/base/security/huks/test/fuzz_test/innerapi_fuzzer/hksupdate_fuzzer/
Dhksupdate_fuzzer.cpp48 paramSet->paramSetSize = size - TRIPLE_BLOB_SIZE; in DoSomethingInterestingWithMyAPI()
/base/security/huks/test/fuzz_test/innerapi_fuzzer/hksimportwrappedkey_fuzzer/
Dhksimportwrappedkey_fuzzer.cpp48 paramSet->paramSetSize = size - TRIPLE_BLOB_SIZE; in DoSomethingInterestingWithMyAPI()
/base/security/huks/test/fuzz_test/innerapi_fuzzer/hksfinish_fuzzer/
Dhksfinish_fuzzer.cpp47 paramSet->paramSetSize = size - TRIPLE_BLOB_SIZE; in DoSomethingInterestingWithMyAPI()
/base/security/huks/services/huks_standard/huks_service/main/os_dependency/idl/ipc/
Dhks_ipc_serialization.c60 …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()

1234