Home
last modified time | relevance | path

Searched refs:outData (Results 1 – 25 of 106) sorted by relevance

12345

/base/security/certificate_manager/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl/cm_ipc/
Dcm_ipc_service.h25 void CmIpcServiceGetCertificateList(const struct CmBlob *paramSetBlob, struct CmBlob *outData,
28 void CmIpcServiceGetCertificateInfo(const struct CmBlob *paramSetBlob, struct CmBlob *outData,
31 void CmIpcServiceSetCertStatus(const struct CmBlob *paramSetBlob, struct CmBlob *outData,
34 void CmIpcServiceInstallAppCert(const struct CmBlob *paramSetBlob, struct CmBlob *outData,
37 void CmIpcServiceUninstallAppCert(const struct CmBlob *paramSetBlob, struct CmBlob *outData,
40 void CmIpcServiceUninstallAllAppCert(const struct CmBlob *paramSetBlob, struct CmBlob *outData,
43 void CmIpcServiceGetAppCertList(const struct CmBlob *paramSetBlob, struct CmBlob *outData,
46 void CmIpcServiceGetAppCert(const struct CmBlob *paramSetBlob, struct CmBlob *outData,
49 void CmIpcServiceGrantAppCertificate(const struct CmBlob *paramSetBlob, struct CmBlob *outData,
52 void CmIpcServiceGetAuthorizedAppList(const struct CmBlob *paramSetBlob, struct CmBlob *outData,
[all …]
Dcm_ipc_service.c64 void CmIpcServiceGetCertificateList(const struct CmBlob *paramSetBlob, struct CmBlob *outData, in CmIpcServiceGetCertificateList() argument
95 ret = CmServiceGetCertListPack(&cmContext, store, &certFileList, outData); in CmIpcServiceGetCertificateList()
101 CmSendResponse(context, ret, outData); in CmIpcServiceGetCertificateList()
114 void CmIpcServiceGetCertificateInfo(const struct CmBlob *paramSetBlob, struct CmBlob *outData, in CmIpcServiceGetCertificateInfo() argument
148 ret = CmServiceGetCertInfoPack(store, &certificateData, status, &certUri, outData); in CmIpcServiceGetCertificateInfo()
154 CmSendResponse(context, ret, outData); in CmIpcServiceGetCertificateInfo()
164 void CmIpcServiceSetCertStatus(const struct CmBlob *paramSetBlob, struct CmBlob *outData, in CmIpcServiceSetCertStatus() argument
203 void CmIpcServiceInstallAppCert(const struct CmBlob *paramSetBlob, struct CmBlob *outData, in CmIpcServiceInstallAppCert() argument
226 ret = CmServicInstallAppCert(&cmContext, &appCertInfo, &certAlias, store, outData); in CmIpcServiceInstallAppCert()
236 CmSendResponse(context, ret, outData); in CmIpcServiceInstallAppCert()
[all …]
/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/alg_module_test/src/
Dopenssl_aes_helper.c125 …ncrypt(const struct HksParamSet *paramSetIn, const struct HksBlob *inData, struct HksBlob *outData, in AesEncrypt() argument
128 …if (inData == NULL || inData->data == NULL || inData->size == 0 || outData == NULL || outData->dat… in AesEncrypt()
129 outData->size == 0) { in AesEncrypt()
165 if (EVP_EncryptUpdate(ctx, outData->data, &outLen, inData->data, inData->size) != 1) { in AesEncrypt()
169 outData->size = (uint32_t)outLen; in AesEncrypt()
170 if (EVP_EncryptFinal_ex(ctx, outData->data + outLen, &outLen) != 1) { in AesEncrypt()
174 outData->size += outLen; in AesEncrypt()
179 …ecrypt(const struct HksParamSet *paramSetIn, const struct HksBlob *inData, struct HksBlob *outData, in AesDecrypt() argument
182 …if (inData == NULL || inData->data == NULL || inData->size == 0 || outData == NULL || outData->dat… in AesDecrypt()
183 outData->size == 0) { in AesDecrypt()
[all …]
/base/security/huks/services/huks_standard/huks_engine/main/core/src/
Dhks_core_service_three_stage.c63 const struct HksBlob *outData) in CheckRsaCipherData() argument
70 if (outData->size < keySize) { in CheckRsaCipherData()
72 outData->size, keySize); in CheckRsaCipherData()
85 if (outData->size < keySize) { in CheckRsaCipherData()
87 outData->size, keySize); in CheckRsaCipherData()
91 if (outData->size < size) { in CheckRsaCipherData()
93 outData->size, keySize); in CheckRsaCipherData()
103 const struct HksBlob *outData) in CheckAesCipherAead() argument
106 if (outData->size < (inData->size + HKS_AE_TAG_LEN)) { in CheckAesCipherAead()
108 outData->size, inData->size); in CheckAesCipherAead()
[all …]
/base/security/huks/frameworks/huks_standard/main/os_dependency/ipc/src/
Dhks_ipc_slice.c55 …c uint32_t GetDataSize(uint32_t cmdId, const struct HksBlob *inData, const struct HksBlob *outData, in GetDataSize() argument
63 HKS_IF_NOT_SUCC_RETURN(GetBlobBufSize(outData, &bufOutDataSize), HKS_ERROR_INVALID_ARGUMENT) in GetDataSize()
65 bufOutDataSize = sizeof(outData->size); in GetDataSize()
76 struct HksBlob *inData, struct HksBlob *outData) in ProcessDataOnce() argument
82 (GetDataSize(cmdId, inData, outData, &dataBufSize) != HKS_SUCCESS)) { in ProcessDataOnce()
99 ret = HksOnceDataPack(&ipcBlob, inData, outData, NULL, &offset); in ProcessDataOnce()
101 ret = HksOnceDataPack(&ipcBlob, inData, NULL, outData, &offset); in ProcessDataOnce()
112 ret = HksSendRequest(cmdId, &ipcBlob, outData, paramSet); in ProcessDataOnce()
119 struct HksBlob *inData, struct HksBlob *outData) in HksSliceDataEntry() argument
129 (GetDataSize(cmdId, inData, outData, &dataBufSize) != HKS_SUCCESS)) { in HksSliceDataEntry()
[all …]
/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/alg_module_test/include/
Dopenssl_aes_helper.h33 …ncrypt(const struct HksParamSet *paramSetIn, const struct HksBlob *inData, struct HksBlob *outData,
36 …ecrypt(const struct HksParamSet *paramSetIn, const struct HksBlob *inData, struct HksBlob *outData,
39 …ncrypt(const struct HksParamSet *paramSetIn, const struct HksBlob *inData, struct HksBlob *outData,
42 …ecrypt(const struct HksParamSet *paramSetIn, const struct HksBlob *inData, struct HksBlob *outData,
/base/security/huks/interfaces/kits/napi/src/v8/
Dhuks_napi_update_finish.cpp44 struct HksBlob *outData = nullptr; member
74 if (context->outData != nullptr) { in DeleteUpdateAsyncContext()
75 if (context->outData->data != nullptr && context->outData->size != 0) { in DeleteUpdateAsyncContext()
76 … (void)memset_s(context->outData->data, context->outData->size, 0, context->outData->size); in DeleteUpdateAsyncContext()
78 FreeHksBlob(context->outData); in DeleteUpdateAsyncContext()
106 context->outData->size = context->inData->size + DATA_SIZE_64KB; in FillContextInDataAndOutData()
107 context->outData->data = static_cast<uint8_t *>(HksMalloc(context->outData->size)); in FillContextInDataAndOutData()
108 if (context->outData->data == nullptr) { in FillContextInDataAndOutData()
118 context->outData = static_cast<HksBlob *>(HksMalloc(sizeof(HksBlob))); in FillContextInDataAndOutBlob()
119 if (context->outData == nullptr) { in FillContextInDataAndOutBlob()
[all …]
/base/security/certificate_manager/frameworks/cert_manager_standard/main/os_dependency/cm_ipc/src/
Dcm_ipc_client_serialization.c56 static int32_t CmCertListGetCertCount(const struct CmBlob *outData, struct CertList *certificateLis… in CmCertListGetCertCount() argument
60 int32_t ret = GetUint32FromBuffer(&certsCount, outData, offset); in CmCertListGetCertCount()
75 int32_t CmCertificateListUnpackFromService(const struct CmBlob *outData, bool needEncode, in CmCertificateListUnpackFromService() argument
80 if ((outData == NULL) || (context == NULL) || (certificateList == NULL) || in CmCertificateListUnpackFromService()
81 (outData->data == NULL) || (certificateList->certAbstract == NULL)) { in CmCertificateListUnpackFromService()
85 int32_t ret = CmCertListGetCertCount(outData, certificateList, &offset); in CmCertificateListUnpackFromService()
92 ret = CmGetBlobFromBuffer(&blob, outData, &offset); in CmCertificateListUnpackFromService()
102 ret = GetUint32FromBuffer(&status, outData, &offset); in CmCertificateListUnpackFromService()
109 ret = CmGetBlobFromBuffer(&blob, outData, &offset); in CmCertificateListUnpackFromService()
119 ret = CmGetBlobFromBuffer(&blob, outData, &offset); in CmCertificateListUnpackFromService()
[all …]
Dcm_ipc_client.c309 static int32_t CmAppCertListGetCertCount(const struct CmBlob *outData, in CmAppCertListGetCertCount() argument
313 int32_t ret = GetUint32FromBuffer(&credCount, outData, offset); in CmAppCertListGetCertCount()
334 static int32_t CmAppCertListUnpackFromService(const struct CmBlob *outData, in CmAppCertListUnpackFromService() argument
339 if ((outData == NULL) || (certificateList == NULL) || in CmAppCertListUnpackFromService()
340 (outData->data == NULL) || (certificateList->credentialAbstract == NULL)) { in CmAppCertListUnpackFromService()
344 int32_t ret = CmAppCertListGetCertCount(outData, certificateList, &offset); in CmAppCertListUnpackFromService()
350 ret = CmGetBlobFromBuffer(&blob, outData, &offset); in CmAppCertListUnpackFromService()
360 ret = CmGetBlobFromBuffer(&blob, outData, &offset); in CmAppCertListUnpackFromService()
370 ret = CmGetBlobFromBuffer(&blob, outData, &offset); in CmAppCertListUnpackFromService()
451 const struct CmBlob *outData, uint32_t *offset) in CmGetAppCertFromBuffer() argument
[all …]
/base/security/huks/interfaces/kits/napi/src/v9/
Dhuks_napi_update_finish_session.cpp44 struct HksBlob *outData = nullptr; member
74 if (context->outData != nullptr) { in DeleteUpdateAsyncContext()
75 if (context->outData->data != nullptr && context->outData->size != 0) { in DeleteUpdateAsyncContext()
76 … (void)memset_s(context->outData->data, context->outData->size, 0, context->outData->size); in DeleteUpdateAsyncContext()
78 FreeHksBlob(context->outData); in DeleteUpdateAsyncContext()
106 context->outData->size = context->inData->size + DATA_SIZE_64KB; in FillContextInDataAndOutData()
107 context->outData->data = static_cast<uint8_t *>(HksMalloc(context->outData->size)); in FillContextInDataAndOutData()
108 if (context->outData->data == nullptr) { in FillContextInDataAndOutData()
118 context->outData = static_cast<struct HksBlob *>(HksMalloc(sizeof(HksBlob))); in FillContextInDataAndOutBlob()
119 if (context->outData == nullptr) { in FillContextInDataAndOutBlob()
[all …]
/base/security/certificate_manager/services/cert_manager_standard/cert_manager_service/main/os_dependency/sa/
Dcm_sa.cpp45 using CmIpcAppHandlerFuncProc = void (*)(const struct CmBlob *msg, struct CmBlob *outData,
119 struct CmBlob outData = { 0, nullptr }; in ProcessMessage() local
121 outData.size = outSize; in ProcessMessage()
122 if (outData.size > MAX_MALLOC_LEN) { in ProcessMessage()
123 CM_LOG_E("outData size is invalid, size:%u", outData.size); in ProcessMessage()
126 outData.data = static_cast<uint8_t *>(CmMalloc(outData.size)); in ProcessMessage()
127 if (outData.data == nullptr) { in ProcessMessage()
132 g_cmIpcHandler[i].handler(static_cast<const struct CmBlob *>(&srcData), &outData, in ProcessMessage()
134 CM_FREE_BLOB(outData); in ProcessMessage()
/base/security/huks/services/huks_standard/huks_engine/main/core/include/
Dhks_core_service_three_stage.h40 const struct HksBlob *inData, struct HksBlob *outData, uint32_t alg);
49 const struct HksBlob *inData, struct HksBlob *outData, uint32_t alg);
52 const struct HksBlob *inData, struct HksBlob *outData, uint32_t alg);
58 const struct HksBlob *inData, struct HksBlob *outData, uint32_t alg);
67 const struct HksBlob *inData, struct HksBlob *outData, uint32_t alg);
79 const struct HksBlob *inData, struct HksBlob *outData, uint32_t alg);
91 const struct HksBlob *inData, struct HksBlob *outData, uint32_t alg);
/base/security/huks/services/huks_standard/huks_service/main/os_dependency/sa/
Dhks_sa.cpp51 using HksIpcThreeStageHandlerFuncProc = void (*)(const struct HksBlob *msg, struct HksBlob *outData,
138 struct HksBlob outData = { 0, nullptr }; in ProcessMessage() local
140 outData.size = outSize; in ProcessMessage()
141 if (outData.size > MAX_MALLOC_LEN) { in ProcessMessage()
142 HKS_LOG_E("outData size is invalid, size:%" LOG_PUBLIC "u", outData.size); in ProcessMessage()
145 outData.data = static_cast<uint8_t *>(HksMalloc(outData.size)); in ProcessMessage()
146 HKS_IF_NULL_LOGE_RETURN(outData.data, HW_SYSTEM_ERROR, "Malloc outData failed.") in ProcessMessage()
148 … g_hksIpcThreeStageHandler[i].handler(reinterpret_cast<const struct HksBlob *>(&srcData), &outData, in ProcessMessage()
150 HKS_FREE_BLOB(outData); in ProcessMessage()
/base/security/huks/services/huks_standard/huks_service/main/os_dependency/idl/ipc/
Dhks_ipc_service.h59 void HksIpcServiceInit(const struct HksBlob *paramSetBlob, struct HksBlob *outData, const uint8_t *…
61 void HksIpcServiceUpdate(const struct HksBlob *paramSetBlob, struct HksBlob *outData, const uint8_t…
63 void HksIpcServiceFinish(const struct HksBlob *paramSetBlob, struct HksBlob *outData, const uint8_t…
65 void HksIpcServiceAbort(const struct HksBlob *paramSetBlob, struct HksBlob *outData, const uint8_t …
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/
Dhks_three_stage_test_common.c44 uint32_t purpose, const struct HksBlob *inData, struct HksBlob *outData) in TestLessThanMaxSeg() argument
68 ret = HksFinish(handle, paramSet, outData, &tmpInData); in TestLessThanMaxSeg()
70 ret = HksFinish(handle, paramSet, &tmpInData, outData); in TestLessThanMaxSeg()
119 const struct HksBlob *inData, struct HksBlob *outData) in TestUpdateLoopFinish() argument
124 uint8_t *cur = outData->data; in TestUpdateLoopFinish()
125 outData->size = 0; in TestUpdateLoopFinish()
149 outData->size += outDataSeg.size; in TestUpdateLoopFinish()
167 outData->size += outDataFinish.size; in TestUpdateLoopFinish()
174 uint32_t purpose, const struct HksBlob *inData, struct HksBlob *outData) in TestUpdateFinish() argument
185 return TestLessThanMaxSeg(handle, paramSet, purpose, inData, outData); in TestUpdateFinish()
[all …]
Dhks_rsa_cipher_test_common.cpp41 struct HksBlob outData = { Unittest::RsaCipher::RSA_COMMON_SIZE, tmpOut }; in HksRsaCipherTestEncryptAbnormal() local
42 ret = HksEncrypt(keyAlias, encryptParamSet, inData, &outData); in HksRsaCipherTestEncryptAbnormal()
47 …EXPECT_EQ(HksMemCmp(outData.data, cipherText->data, outData.size), HKS_SUCCESS) << "cipherText not… in HksRsaCipherTestEncryptAbnormal()
71 struct HksBlob outData = { Unittest::RsaCipher::RSA_COMMON_SIZE, tmpOut }; in HksRsaCipherTestEncrypt() local
72 ret = HksEncrypt(keyAlias, encryptParamSet, inData, &outData); in HksRsaCipherTestEncrypt()
101 struct HksBlob outData = { Unittest::RsaCipher::RSA_COMMON_SIZE, tmpOut }; in HksRsaCipherTestDecrypt() local
102 ret = HksDecrypt(keyAlias, decryptParamSet, cipherText, &outData); in HksRsaCipherTestDecrypt()
107 …EXPECT_EQ(HksMemCmp(outData.data, plainText->data, outData.size), HKS_SUCCESS) << "plainText not e… in HksRsaCipherTestDecrypt()
Dhks_pbkdf2_derive_test_common.cpp44 struct HksBlob outData = { COMMON_SIZE, tmpOut }; in HksPbkdf2DeriveTestNormalCase() local
45 ret = HksUpdate(&handleDerive, deriveParamSet, &inData, &outData); in HksPbkdf2DeriveTestNormalCase()
79 struct HksBlob outData = { COMMON_SIZE, tmpOut }; in HksPbkdf2DeriveTestCmpCase() local
80 ret = HksUpdate(&handleDerive, deriveParamSet, &inData, &outData); in HksPbkdf2DeriveTestCmpCase()
Dhks_hkdf_derive_test_common.cpp44 struct HksBlob outData = { COMMON_SIZE, tmpOut }; in HksHkdfDeriveTestNormalCase() local
45 ret = HksUpdate(&handleDerive, deriveParamSet, &inData, &outData); in HksHkdfDeriveTestNormalCase()
78 struct HksBlob outData = { COMMON_SIZE, tmpOut }; in HksHkdfDeriveTestCmpCase() local
79 ret = HksUpdate(&handleDerive, deriveParamSet, &inData, &outData); in HksHkdfDeriveTestCmpCase()
Dhks_cross_test_common.cpp195 struct HksBlob outData = { CROSS_COMMON_SIZE, out }; in HksCrossTestHmac() local
196 ret = TestUpdateFinish(&handleHMAC, hmacParamSet, HKS_KEY_PURPOSE_MAC, &inData, &outData); in HksCrossTestHmac()
202 ret = HksMemCmp(mac.data, outData.data, outData.size); in HksCrossTestHmac()
271 …truct HksParamSet *initParamSet, const struct HksParamSet *finishParamSet, struct HksBlob *outData) in HksCrossTestAgree() argument
294 ret = HksFinish(&handle, finishParamSet, &inData, outData); in HksCrossTestAgree()
333 struct HksBlob outData = { CROSS_COMMON_SIZE, outDataD }; in HksCrossTestDerive() local
334 ret = HksFinish(&handleDerive, finishParamSet, &inData, &outData); in HksCrossTestDerive()
348 ret = HksMemCmp(derivedKey.data, outData.data, outData.size); in HksCrossTestDerive()
/base/security/huks/utils/crypto_adapter/
Dhks_client_service_adapter_common.c40 uint8_t *outData = (uint8_t *)HksMalloc(key->size); in CopyToInnerKey() local
41 HKS_IF_NULL_LOGE_RETURN(outData, HKS_ERROR_MALLOC_FAIL, "malloc failed") in CopyToInnerKey() local
43 (void)memcpy_s(outData, key->size, key->data, key->size); in CopyToInnerKey()
44 outKey->data = outData; in CopyToInnerKey()
/base/security/certificate_manager/frameworks/cert_manager_standard/main/os_dependency/cm_ipc/include/
Dcm_ipc_client_serialization.h33 int32_t CmCertificateListUnpackFromService(const struct CmBlob *outData, bool needEncode,
36 int32_t CmCertificateInfoUnpackFromService(const struct CmBlob *outData, const struct CmBlob *certU…
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/include/
Dhks_three_stage_test_common.h38 const struct HksBlob *inData, struct HksBlob *outData);
40 uint32_t purpose, const struct HksBlob *inData, struct HksBlob *outData);
/base/security/certificate_manager/test/unittest/src/
Dcm_finish_test.cpp211 struct CmBlob outData = { 0, nullptr }; variable
213 int32_t ret = CmFinish(handle, &inData, &outData);
228 struct CmBlob outData = { 0, nullptr }; variable
230 int32_t ret = CmFinish(&handle, &inData, &outData);
245 struct CmBlob outData = { 0, nullptr }; variable
247 int32_t ret = CmFinish(&handle, &inData, &outData);
262 struct CmBlob outData = { 0, nullptr }; variable
264 int32_t ret = CmFinish(&handle, inData, &outData);
279 struct CmBlob *outData = nullptr; variable
281 int32_t ret = CmFinish(&handle, &inData, outData);
[all …]
/base/security/huks/test/fuzz_test/hksupdate_fuzzer/
Dhksupdate_fuzzer.cpp45 struct HksBlob outData = { BLOB_SIZE, static_cast<uint8_t *>(myData + DOUBLE_BLOB_SIZE) }; in DoSomethingInterestingWithMyAPI() local
50 (void)HksUpdate(&handle, paramSet, &inData, &outData); in DoSomethingInterestingWithMyAPI()
/base/security/huks/test/fuzz_test/hksfinish_fuzzer/
Dhksfinish_fuzzer.cpp44 struct HksBlob outData = { BLOB_SIZE, static_cast<uint8_t *>(myData + DOUBLE_BLOB_SIZE) }; in DoSomethingInterestingWithMyAPI() local
49 (void)HksFinish(&handle, paramSet, &inData, &outData); in DoSomethingInterestingWithMyAPI()

12345