Home
last modified time | relevance | path

Searched refs:outBlob (Results 1 – 18 of 18) sorted by relevance

/base/security/huks/frameworks/huks_standard/main/os_dependency/ipc/src/
Dhks_request.cpp44 static int32_t HksReadRequestReply(MessageParcel &reply, struct HksBlob *outBlob) in HksReadRequestReply() argument
51 if (outBlob != nullptr) { in HksReadRequestReply()
52 outBlob->size = 0; in HksReadRequestReply()
57 HKS_IF_NOT_SUCC_RETURN(CheckBlob(outBlob), HKS_ERROR_INVALID_ARGUMENT) in HksReadRequestReply()
62 if (outBlob->size < outLen) { in HksReadRequestReply()
63 …HKS_LOG_E("outBlob size[%" LOG_PUBLIC "u] smaller than outLen[%" LOG_PUBLIC "u]", outBlob->size, o… in HksReadRequestReply()
67 (void)memcpy_s(outBlob->data, outBlob->size, outData, outLen); in HksReadRequestReply()
68 outBlob->size = outLen; in HksReadRequestReply()
73 struct HksBlob *outBlob, const struct HksParamSet *paramSet) in HksSendRequest() argument
93 if (outBlob == nullptr) { in HksSendRequest()
[all …]
Dhks_samgr_client_proxy.c38 static int32_t SynchronizeOutput(struct HksBlob *outBlob) in SynchronizeOutput() argument
50 if ((outBlob != NULL) && (g_outBlob.data != NULL) && (g_outBlob.size != 0)) { in SynchronizeOutput()
51 if (outBlob->size < g_outBlob.size) { in SynchronizeOutput()
56 if (memcpy_s(outBlob->data, outBlob->size, g_outBlob.data, g_outBlob.size) != EOK) { in SynchronizeOutput()
61 outBlob->size = g_outBlob.size; in SynchronizeOutput()
108 struct HksBlob *outBlob);
137 return SynchronizeOutput(outBlob);
173 …2_t HksSendRequestSync(enum HksMessage type, const struct HksBlob *inBlob, struct HksBlob *outBlob) in HksSendRequestSync() argument
186 ret = clientProxy->IpcAsyncCallBack((IUnknown *)clientProxy, type, inBlob, outBlob); in HksSendRequestSync()
191 int32_t HksSendRequest(enum HksMessage type, const struct HksBlob *inBlob, struct HksBlob *outBlob, in HksSendRequest() argument
[all …]
Dhks_client_service_ipc.c52 struct HksBlob outBlob = { 0, NULL }; in HksClientGenerateKey() local
54 sizeof(outBlob.size); in HksClientGenerateKey()
58 outBlob.size = paramSetOut->paramSetSize; in HksClientGenerateKey()
59 outBlob.data = (uint8_t *)paramSetOut; in HksClientGenerateKey()
63 ret = HksGenerateKeyPack(&inBlob, keyAlias, paramSetIn, &outBlob); in HksClientGenerateKey()
66 ret = HksSendRequest(HKS_MSG_GEN_KEY, &inBlob, &outBlob, paramSetIn); in HksClientGenerateKey()
165 struct HksBlob outBlob = { paramSetOut->paramSetSize, (uint8_t *)paramSetOut }; in HksClientGetKeyParamSet() local
171 ret = HksGetKeyParamSetPack(&inBlob, keyAlias, &outBlob); in HksClientGetKeyParamSet()
174 ret = HksSendRequest(HKS_MSG_GET_KEY_PARAMSET, &inBlob, &outBlob, NULL); in HksClientGetKeyParamSet()
433 struct HksBlob outBlob = { 0, NULL }; in HksClientGetKeyInfoList() local
[all …]
Dhks_ipc_serialization.c370 static int32_t EncodeCertChain(const struct HksBlob *inBlob, struct HksBlob *outBlob) in EncodeCertChain() argument
402 if (memcpy_s(outBlob->data, outBlob->size, tmpBlob.data, tmpBlob.size) != EOK) { in EncodeCertChain()
407 outBlob->size = tmpBlob.size; in EncodeCertChain()
/base/security/certificate_manager/frameworks/cert_manager_standard/main/os_dependency/cm_ipc/src/
Dcm_request.cpp73 static int32_t CmReadRequestReply(MessageParcel &reply, struct CmBlob *outBlob) in CmReadRequestReply() argument
83 if (outBlob != nullptr) { in CmReadRequestReply()
84 outBlob->size = 0; in CmReadRequestReply()
88 if (CmCheckBlob(outBlob) != CM_SUCCESS) { in CmReadRequestReply()
96 if (outBlob->size < outLen) { in CmReadRequestReply()
97 CM_LOG_E("outBlob size[%u] smaller than outLen[%u]", outBlob->size, outLen); in CmReadRequestReply()
100 if (memcpy_s(outBlob->data, outBlob->size, outData, outLen) != EOK) { in CmReadRequestReply()
103 outBlob->size = outLen; in CmReadRequestReply()
108 struct CmBlob *outBlob) in SendRequest() argument
131 if (outBlob == nullptr) { in SendRequest()
[all …]
Dcm_ipc_client.c58 struct CmBlob outBlob = { 0, NULL }; in GetCertificateList() local
73 ret = GetCertListInitOutData(&outBlob); in GetCertificateList()
79 ret = SendRequest(type, &parcelBlob, &outBlob); in GetCertificateList()
85 ret = CmCertificateListUnpackFromService(&outBlob, false, &context, certificateList); in GetCertificateList()
88 CM_FREE_BLOB(outBlob); in GetCertificateList()
116 struct CmBlob outBlob = { 0, NULL }; in GetCertificateInfo() local
131 ret = GetCertInfoInitOutData(&outBlob); in GetCertificateInfo()
137 ret = SendRequest(type, &parcelBlob, &outBlob); in GetCertificateInfo()
143 ret = CmCertificateInfoUnpackFromService(&outBlob, certUri, certificateInfo); in GetCertificateInfo()
150 CM_FREE_BLOB(outBlob); in GetCertificateInfo()
[all …]
/base/security/crypto_framework/test/unittest/src/
Dcrypto_md_test.cpp171 HcfBlob outBlob = { .data = nullptr, .len = 0 }; variable
173 ret = mdObj->doFinal(mdObj, &outBlob);
176 HcfBlobDataClearAndFree(&outBlob);
190 HcfBlob outBlob = { .data = nullptr, .len = 0 }; variable
194 ret = mdObj->doFinal(mdObj, &outBlob);
197 HcfBlobDataClearAndFree(&outBlob);
211 HcfBlob outBlob = { .data = nullptr, .len = 0 }; variable
215 ret = mdObj->doFinal(mdObj, &outBlob);
217 PrintfBlobInHex(outBlob.data, outBlob.len);
219 HcfBlobDataClearAndFree(&outBlob);
[all …]
Dcrypto_mac_test.cpp247 HcfBlob outBlob = { .data = nullptr, .len = 0 }; variable
249 ret = macObj->doFinal(macObj, &outBlob);
273 HcfBlob outBlob = { .data = nullptr, .len = 0 }; variable
278 ret = macObj->doFinal(macObj, &outBlob);
281 PrintfBlobInHex(outBlob.data, outBlob.len);
283 HcfBlobDataClearAndFree(&outBlob);
313 HcfBlob outBlob = { .data = nullptr, .len = 0 }; variable
319 ret = macObj->doFinal(macObj, &outBlob);
322 HcfBlobDataClearAndFree(&outBlob);
348 HcfBlob outBlob = { .data = nullptr, .len = 0 }; variable
[all …]
/base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/src/
Dcert_manager_crypto_operation.c63 struct HcfBlob outBlob = { NULL, 0 }; in CmGetHash() local
79 retHcf = mdObj->doFinal(mdObj, &outBlob); in CmGetHash()
85 if (hash->size < outBlob.len) { in CmGetHash()
90 if (memcpy_s(hash->data, hash->size, outBlob.data, outBlob.len) != EOK) { in CmGetHash()
94 hash->size = outBlob.len; in CmGetHash()
98 HcfBlobDataClearAndFree(&outBlob); in CmGetHash()
/base/security/crypto_framework/test/fuzztest/crypto_operation/hcfmdcreate_fuzzer/
Dhcfmdcreate_fuzzer.cpp40 HcfBlob outBlob = { 0 }; in TestMd() local
41 (void)mdObj->doFinal(mdObj, &outBlob); in TestMd()
44 HcfBlobDataClearAndFree(&outBlob); in TestMd()
/base/security/crypto_framework/frameworks/js/napi/crypto/src/
Dnapi_md.cpp45 HcfBlob *outBlob = nullptr; member
68 if (context->outBlob != nullptr) { in FreeCryptoFwkCtx()
69 HcfFree(context->outBlob->data); in FreeCryptoFwkCtx()
70 context->outBlob->data = nullptr; in FreeCryptoFwkCtx()
71 context->outBlob->len = 0; in FreeCryptoFwkCtx()
72 HcfFree(context->outBlob); in FreeCryptoFwkCtx()
73 context->outBlob = nullptr; in FreeCryptoFwkCtx()
161 HcfBlob *outBlob = reinterpret_cast<HcfBlob *>(HcfMalloc(sizeof(HcfBlob), 0)); in MdDoFinalExecute() local
162 if (outBlob == nullptr) { in MdDoFinalExecute()
168 context->errCode = mdObj->doFinal(mdObj, outBlob); in MdDoFinalExecute()
[all …]
Dnapi_mac.cpp46 HcfBlob *outBlob = nullptr; member
70 if (context->outBlob != nullptr) { in FreeCryptoFwkCtx()
71 HcfFree(context->outBlob->data); in FreeCryptoFwkCtx()
72 context->outBlob->data = nullptr; in FreeCryptoFwkCtx()
73 context->outBlob->len = 0; in FreeCryptoFwkCtx()
74 HcfFree(context->outBlob); in FreeCryptoFwkCtx()
75 context->outBlob = nullptr; in FreeCryptoFwkCtx()
191 HcfBlob *outBlob = reinterpret_cast<HcfBlob *>(HcfMalloc(sizeof(HcfBlob), 0)); in MacDoFinalExecute() local
192 if (outBlob == nullptr) { in MacDoFinalExecute()
198 context->errCode = macObj->doFinal(macObj, outBlob); in MacDoFinalExecute()
[all …]
/base/security/crypto_framework/test/fuzztest/crypto_operation/hcfmaccreate_fuzzer/
Dhcfmaccreate_fuzzer.cpp51 HcfBlob outBlob = { 0 }; in TestMac() local
52 (void)macObj->doFinal(macObj, &outBlob); in TestMac()
55 HcfBlobDataClearAndFree(&outBlob); in TestMac()
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/
Dhks_import_wrapped_test_common.cpp64 struct HksBlob outBlob = { 0, nullptr }; in BuildWrappedKeyData() local
65 outBlob.size = totalLength; in BuildWrappedKeyData()
66 (void)MallocAndCheckBlobData(&outBlob, outBlob.size); in BuildWrappedKeyData()
72 …if (memcpy_s(outBlob.data + offset, totalLength - offset, reinterpret_cast<uint8_t *>(&blobArray[i… in BuildWrappedKeyData()
78 if (memcpy_s(outBlob.data + offset, totalLength - offset, blobArray[i]->data, in BuildWrappedKeyData()
85 outData->size = outBlob.size; in BuildWrappedKeyData()
86 outData->data = outBlob.data; in BuildWrappedKeyData()
/base/security/certificate_manager/frameworks/cert_manager_standard/main/os_dependency/cm_ipc/include/
Dcm_request.h34 struct CmBlob *outBlob);
/base/security/huks/frameworks/huks_standard/main/os_dependency/ipc/include/
Dhks_samgr_client.h25 struct HksBlob *outBlob);
Dhks_request.h62 int32_t HksSendRequest(enum HksMessage type, const struct HksBlob *inBlob, struct HksBlob *outBlob,
/base/security/crypto_framework/plugin/openssl_plugin/key/asy_key_generator/src/
Drsa_asy_key_generator_openssl.c168 static HcfResult CopyMemFromBIO(BIO *bio, HcfBlob *outBlob) in CopyMemFromBIO() argument
170 if (bio == NULL || outBlob == NULL) { in CopyMemFromBIO()
192 outBlob->len = blob.len; in CopyMemFromBIO()
193 outBlob->data = blob.data; in CopyMemFromBIO()