Home
last modified time | relevance | path

Searched refs:blob (Results 1 – 25 of 240) sorted by relevance

12345678910

/base/security/crypto_framework/common/src/
Dblob.c22 void HcfBlobDataFree(HcfBlob *blob) in HcfBlobDataFree() argument
24 if ((blob == NULL) || (blob->data == NULL)) { in HcfBlobDataFree()
27 HcfFree(blob->data); in HcfBlobDataFree()
28 blob->data = NULL; in HcfBlobDataFree()
29 blob->len = 0; in HcfBlobDataFree()
32 void HcfBlobDataClearAndFree(HcfBlob *blob) in HcfBlobDataClearAndFree() argument
34 if ((blob == NULL) || (blob->data == NULL)) { in HcfBlobDataClearAndFree()
38 (void)memset_s(blob->data, blob->len, 0, blob->len); in HcfBlobDataClearAndFree()
39 HcfFree(blob->data); in HcfBlobDataClearAndFree()
40 blob->data = NULL; in HcfBlobDataClearAndFree()
[all …]
Dutils.c35 bool IsBlobValid(const HcfBlob *blob) in IsBlobValid() argument
37 return ((blob != NULL) && (blob->data != NULL) && (blob->len > 0)); in IsBlobValid()
/base/security/certificate_manager/frameworks/cert_manager_standard/main/common/include/
Dcm_mem.h39 #define CM_FREE_BLOB(blob) do { \ argument
40 if ((blob).data != NULL) { \
41 CmFree((blob).data); \
42 (blob).data = NULL; \
44 (blob).size = 0; \
47 #define CMMUTABLE_FREE_BLOB(blob) do { \ argument
48 if ((blob).data != NULL) { \
49 CmFree((blob).data); \
50 (blob).data = NULL; \
52 (blob).size = 0; \
/base/notification/distributed_notification_service/services/test/moduletest/mock/
Dblob.cpp25 Blob::Blob(const Blob &blob) in Blob() argument
27 blob_ = blob.Data(); in Blob()
30 Blob::Blob(Blob &&blob) in Blob() argument
32 blob_.swap(blob.blob_); in Blob()
35 Blob &Blob::operator=(const Blob &blob) in operator =() argument
38 if (&blob == this) { in operator =()
42 blob_ = blob.Data(); in operator =()
47 Blob &Blob::operator=(Blob &&blob) in operator =() argument
50 if (&blob == this) { in operator =()
54 blob_.swap(blob.blob_); in operator =()
[all …]
/base/notification/distributed_notification_service/services/ans/test/unittest/mock/
Dblob.cpp25 Blob::Blob(const Blob &blob) in Blob() argument
27 blob_ = blob.Data(); in Blob()
30 Blob::Blob(Blob &&blob) in Blob() argument
32 blob_.swap(blob.blob_); in Blob()
35 Blob &Blob::operator=(const Blob &blob) in operator =() argument
38 if (&blob == this) { in operator =()
42 blob_ = blob.Data(); in operator =()
47 Blob &Blob::operator=(Blob &&blob) in operator =() argument
50 if (&blob == this) { in operator =()
54 blob_.swap(blob.blob_); in operator =()
[all …]
/base/notification/distributed_notification_service/frameworks/test/moduletest/mock/
Dblob.cpp25 Blob::Blob(const Blob &blob) in Blob() argument
27 blob_ = blob.Data(); in Blob()
30 Blob::Blob(Blob &&blob) in Blob() argument
32 blob_.swap(blob.blob_); in Blob()
35 Blob &Blob::operator=(const Blob &blob) in operator =() argument
38 if (&blob == this) { in operator =()
42 blob_ = blob.Data(); in operator =()
47 Blob &Blob::operator=(Blob &&blob) in operator =() argument
50 if (&blob == this) { in operator =()
54 blob_.swap(blob.blob_); in operator =()
[all …]
/base/notification/distributed_notification_service/services/distributed/test/unittest/mock/
Dmock_blob.cpp25 Blob::Blob(const Blob &blob) in Blob() argument
27 blob_ = blob.Data(); in Blob()
30 Blob::Blob(Blob &&blob) in Blob() argument
32 blob_.swap(blob.blob_); in Blob()
35 Blob &Blob::operator=(const Blob &blob) in operator =() argument
38 if (&blob == this) { in operator =()
42 blob_ = blob.Data(); in operator =()
47 Blob &Blob::operator=(Blob &&blob) in operator =() argument
50 if (&blob == this) { in operator =()
54 blob_.swap(blob.blob_); in operator =()
/base/security/crypto_framework/frameworks/js/napi/certificate/src/
Dnapi_x509_certificate.cpp345 HcfBlob *blob = reinterpret_cast<HcfBlob *>(HcfMalloc(sizeof(HcfBlob), 0)); in GetIssuerName() local
346 if (blob == nullptr) { in GetIssuerName()
351 HcfResult ret = cert->getIssuerName(cert, blob); in GetIssuerName()
355 HcfFree(blob); in GetIssuerName()
356 blob = nullptr; in GetIssuerName()
359 napi_value returnValue = ConvertBlobToNapiValue(env, blob); in GetIssuerName()
360 HcfBlobDataFree(blob); in GetIssuerName()
361 HcfFree(blob); in GetIssuerName()
362 blob = nullptr; in GetIssuerName()
368 HcfBlob *blob = reinterpret_cast<HcfBlob *>(HcfMalloc(sizeof(HcfBlob), 0)); in GetSubjectName() local
[all …]
Dnapi_x509_crl.cpp53 HcfBlob *blob = nullptr; member
79 HcfBlobDataFree(context->blob); in FreeCryptoFwkCtx()
80 HcfFree(context->blob); in FreeCryptoFwkCtx()
81 context->blob = nullptr; in FreeCryptoFwkCtx()
236 HcfBlob *blob = reinterpret_cast<HcfBlob *>(array->data + i); in GenerateCrlEntryArray() local
237 HcfX509CrlEntry *entry = reinterpret_cast<HcfX509CrlEntry *>(blob->data); in GenerateCrlEntryArray()
396 HcfBlob *blob = reinterpret_cast<HcfBlob *>(HcfMalloc(sizeof(HcfBlob), 0)); in GetIssuerDN() local
397 if (blob == nullptr) { in GetIssuerDN()
401 HcfResult ret = x509Crl->getIssuerName(x509Crl, blob); in GetIssuerDN()
405 HcfFree(blob); in GetIssuerDN()
[all …]
Dnapi_x509_crl_entry.cpp44 HcfBlob *blob = nullptr; member
65 HcfBlobDataFree(context->blob); in FreeCryptoFwkCtx()
66 HcfFree(context->blob); in FreeCryptoFwkCtx()
67 context->blob = nullptr; in FreeCryptoFwkCtx()
214 HcfBlob *blob = reinterpret_cast<HcfBlob *>(HcfMalloc(sizeof(HcfBlob), 0)); in GetCertificateIssuer() local
215 if (blob == nullptr) { in GetCertificateIssuer()
221 HcfResult ret = x509CrlEntry->getCertIssuer(x509CrlEntry, blob); in GetCertificateIssuer()
225 HcfFree(blob); in GetCertificateIssuer()
226 blob = nullptr; in GetCertificateIssuer()
229 napi_value returnValue = ConvertBlobToNapiValue(env, blob); in GetCertificateIssuer()
[all …]
/base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/include/
Dcert_manager_mem.h39 #define CM_FREE_BLOB(blob) do { \ argument
40 if ((blob).data != NULL) { \
41 CMFree((blob).data); \
42 (blob).data = NULL; \
44 (blob).size = 0; \
/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/sdk_test/include/
Dhks_test_mem.h38 #define HKS_FREE_BLOB(blob) do { \ argument
39 if ((blob).data != NULL) { \
40 HksTestFree((blob).data); \
41 (blob).data = NULL; \
43 (blob).size = 0; \
/base/security/huks/frameworks/huks_standard/main/common/include/
Dhks_mem.h50 #define HKS_FREE_BLOB(blob) do { \ argument
51 if ((blob).data != HKS_NULL_POINTER) { \
52 free((blob).data); \
53 (blob).data = HKS_NULL_POINTER; \
55 (blob).size = 0; \
/base/security/device_security_level/oem_property/ohos/impl/
Dexternal_interface_adapter.c119 …{.tag = HKS_TAG_ATTESTATION_CHALLENGE, .blob = {strlen(info->nonceStr) + 1, (uint8_t *)info->nonce… in DslmCredAttestAdapter()
120 …{.tag = HKS_TAG_ATTESTATION_ID_SEC_LEVEL_INFO, .blob = {strlen(info->credStr) + 1, (uint8_t *)info… in DslmCredAttestAdapter()
121 …{.tag = HKS_TAG_ATTESTATION_ID_UDID, .blob = {strlen(info->udidStr) + 1, (uint8_t *)info->udidStr}… in DslmCredAttestAdapter()
122 {.tag = HKS_TAG_ATTESTATION_ID_ALIAS, .blob = keyAlias}, in DslmCredAttestAdapter()
170 … {.tag = HKS_TAG_ATTESTATION_CHALLENGE, .blob = {DSLM_INFO_MAX_LEN_NONCE, (uint8_t *)nonceStr}}, in ValidateCertChainAdapter()
171 …{.tag = HKS_TAG_ATTESTATION_ID_SEC_LEVEL_INFO, .blob = {DSLM_INFO_MAX_LEN_CRED, (uint8_t *)credStr… in ValidateCertChainAdapter()
172 {.tag = HKS_TAG_ATTESTATION_ID_UDID, .blob = {DSLM_INFO_MAX_LEN_UDID, (uint8_t *)udidStr}}, in ValidateCertChainAdapter()
192 struct HksBlob *blob = &outputParam->params[cnt].blob; in ValidateCertChainAdapter() local
193 if (memcpy_s(resultInfo->nonceStr, DSLM_INFO_MAX_LEN_NONCE, blob->data, blob->size) != EOK) { in ValidateCertChainAdapter()
197 blob = &outputParam->params[++cnt].blob; in ValidateCertChainAdapter()
[all …]
/base/security/huks/services/huks_standard/huks_service/main/os_dependency/ca/
Dhks_teec.c74 static inline void InitializeBlob(struct HksBlob *blob, uint32_t size, uint8_t *data) in InitializeBlob() argument
76 if (blob != NULL) { in InitializeBlob()
77 blob->data = data; in InitializeBlob()
78 blob->size = size; in InitializeBlob()
227 dest->tmpRef.buffer = src->blob.data; in FillUpArgs()
228 dest->tmpRef.size = src->blob.size; in FillUpArgs()
277 InitializeBlob(&params[0].blob, keybox->size, keybox->data); in HksTeeProvision()
278 InitializeBlob(&params[1].blob, challenge->size, challenge->data); in HksTeeProvision()
279 InitializeBlob(&params[2].blob, signature->size, signature->data); /* 2 is array index */ in HksTeeProvision()
280 InitializeBlob(&params[3].blob, certData->size, certData->data); /* 3 is array index */ in HksTeeProvision()
[all …]
/base/security/crypto_framework/plugin/openssl_plugin/crypto_operation/aes/src/
Dcipher_aes_common.c77 void FreeRedundantOutput(HcfBlob *blob) in FreeRedundantOutput() argument
79 if (blob == NULL) { in FreeRedundantOutput()
83 if ((blob->len == 0) && (blob->data != NULL)) { in FreeRedundantOutput()
84 HcfFree(blob->data); in FreeRedundantOutput()
85 blob->data = NULL; in FreeRedundantOutput()
/base/security/certificate_manager/frameworks/cert_manager_standard/main/os_dependency/cm_ipc/src/
Dcm_ipc_client_serialization.c38 int32_t CmGetBlobFromBuffer(struct CmBlob *blob, const struct CmBlob *srcBlob, uint32_t *srcOffset) in CmGetBlobFromBuffer() argument
49 blob->size = size; in CmGetBlobFromBuffer()
50 *srcOffset += sizeof(blob->size); in CmGetBlobFromBuffer()
51 blob->data = (uint8_t *)(srcBlob->data + *srcOffset); in CmGetBlobFromBuffer()
52 *srcOffset += ALIGN_SIZE(blob->size); in CmGetBlobFromBuffer()
79 struct CmBlob blob = {0}; in CmCertificateListUnpackFromService() local
92 ret = CmGetBlobFromBuffer(&blob, outData, &offset); in CmCertificateListUnpackFromService()
97 …(certificateList->certAbstract[i].subjectName, MAX_LEN_SUBJECT_NAME, blob.data, blob.size) != EOK)… in CmCertificateListUnpackFromService()
109 ret = CmGetBlobFromBuffer(&blob, outData, &offset); in CmCertificateListUnpackFromService()
114 … if (memcpy_s(certificateList->certAbstract[i].uri, MAX_LEN_URI, blob.data, blob.size) != EOK) { in CmCertificateListUnpackFromService()
[all …]
Dcm_ipc_client.c120 { .tag = CM_TAG_PARAM0_BUFFER, .blob = *certUri }, in GetCertificateInfo()
167 { .tag = CM_TAG_PARAM0_BUFFER, .blob = *certUri }, in SetCertificateStatus()
202 .blob = *appCert }, in InstallAppCert()
204 .blob = *appCertPwd }, in InstallAppCert()
206 .blob = *certAlias }, in InstallAppCert()
246 .blob = *keyUri }, in UninstallAppCert()
338 struct CmBlob blob = { 0, NULL }; in CmAppCertListUnpackFromService() local
350 ret = CmGetBlobFromBuffer(&blob, outData, &offset); in CmAppCertListUnpackFromService()
355 …s(certificateList->credentialAbstract[i].type, MAX_LEN_SUBJECT_NAME, blob.data, blob.size) != EOK)… in CmAppCertListUnpackFromService()
360 ret = CmGetBlobFromBuffer(&blob, outData, &offset); in CmAppCertListUnpackFromService()
[all …]
/base/security/huks/interfaces/kits/napi/include/v8/
Dhuks_napi_common.h65 napi_value GenerateStringArray(napi_env env, const struct HksBlob *blob, const uint32_t blobCount);
88 inline void FreeHksBlob(HksBlob *&blob) in FreeHksBlob() argument
90 if (blob == nullptr) { in FreeHksBlob()
94 if (blob->data != nullptr) { in FreeHksBlob()
95 HksFree(blob->data); in FreeHksBlob()
96 blob->data = nullptr; in FreeHksBlob()
98 blob->size = 0; in FreeHksBlob()
100 HksFree(blob); in FreeHksBlob()
101 blob = nullptr; in FreeHksBlob()
107 struct HksBlob *&blob, struct HksParamSet *&paramSet);
/base/hiviewdfx/hiview/
DREADME_zh.md77 [DFX子系统](https://gitee.com/openharmony/docs/blob/master/zh-cn/readme/DFX%E5%AD%90%E7%B3%BB%E7%BB%9F…
81 [hiviewdfx\_hilog](https://gitee.com/openharmony/hiviewdfx_hilog/blob/master/README_zh.md)
83 [hiviewdfx\_hiappevent](https://gitee.com/openharmony/hiviewdfx_hiappevent/blob/master/README_zh.md)
85 [hiviewdfx\_hisysevent](https://gitee.com/openharmony/hiviewdfx_hisysevent/blob/master/README_zh.md)
87 [hiviewdfx\_faultloggerd](https://gitee.com/openharmony/hiviewdfx_faultloggerd/blob/master/README_z…
89 [hiviewdfx\_hilog\_lite](https://gitee.com/openharmony/hiviewdfx_hilog_lite/blob/master/README_zh.m…
91 [hiviewdfx\_hievent\_lite](https://gitee.com/openharmony/hiviewdfx_hievent_lite/blob/master/README_…
93 [hiviewdfx\_hiview\_lite](https://gitee.com/openharmony/hiviewdfx_hiview_lite/blob/master/README_zh…
/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/alg_module_test/src/
Dhks_rsa_common_mt.cpp53 HksBlob publicKey = { .size = pubKeyExport->blob.size, .data = in GenerateKeyTestCase()
54 static_cast<uint8_t *>(HksMalloc(pubKeyExport->blob.size)) }; in GenerateKeyTestCase()
56 …(void)memcpy_s(publicKey.data, pubKeyExport->blob.size, pubKeyExport->blob.data, pubKeyExport->blo… in GenerateKeyTestCase()
60 HksBlob privateKey = { .size = priKeyExport->blob.size, .data = in GenerateKeyTestCase()
61 static_cast<uint8_t *>(HksMalloc(priKeyExport->blob.size)) }; in GenerateKeyTestCase()
63 …(void)memcpy_s(privateKey.data, priKeyExport->blob.size, priKeyExport->blob.data, priKeyExport->bl… in GenerateKeyTestCase()
118 HksBlob publicKey = { .size = pubKeyExport->blob.size, in EncryptLocalTestCase()
119 .data = static_cast<uint8_t *>(HksMalloc(pubKeyExport->blob.size)) }; in EncryptLocalTestCase()
121 …(void)memcpy_s(publicKey.data, pubKeyExport->blob.size, pubKeyExport->blob.data, pubKeyExport->blo… in EncryptLocalTestCase()
126 HksBlob privateKey = { .size = priKeyExport->blob.size, in EncryptLocalTestCase()
[all …]
/base/security/huks/interfaces/kits/napi/include/v9/
Dhuks_napi_common_item.h74 inline void FreeHksBlob(HksBlob *&blob) in FreeHksBlob() argument
76 if (blob == nullptr) { in FreeHksBlob()
80 if (blob->data != nullptr) { in FreeHksBlob()
81 HksFree(blob->data); in FreeHksBlob()
82 blob->data = nullptr; in FreeHksBlob()
84 blob->size = 0; in FreeHksBlob()
86 HksFree(blob); in FreeHksBlob()
87 blob = nullptr; in FreeHksBlob()
107 struct HksBlob *&blob, struct HksParamSet *&paramSet);
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/
Dhks_attest_key_nonids_test.cpp58 { .tag = HKS_TAG_ATTESTATION_ID_SEC_LEVEL_INFO, .blob = g_secInfo },
59 { .tag = HKS_TAG_ATTESTATION_CHALLENGE, .blob = g_challenge },
60 { .tag = HKS_TAG_ATTESTATION_ID_VERSION_INFO, .blob = g_version },
61 { .tag = HKS_TAG_ATTESTATION_ID_ALIAS, .blob = g_keyAlias },
91 .blob = { .size = g_keyParamsetSize, .data = (uint8_t *)HksMalloc(g_keyParamsetSize) }
93 ASSERT_TRUE(g_getParam.blob.data != nullptr);
99 HksFree(g_getParam.blob.data);
214 { .tag = HKS_TAG_ATTESTATION_ID_SEC_LEVEL_INFO, .blob = g_secInfo },
215 { .tag = HKS_TAG_ATTESTATION_CHALLENGE, .blob = g_challenge },
216 { .tag = HKS_TAG_ATTESTATION_ID_VERSION_INFO, .blob = g_version },
[all …]
Dhks_attest_key_test_common.cpp180 …I("secinfo is %" LOG_PUBLIC "s\n", reinterpret_cast<char *>(paramSet->params[g_index0].blob.data)); in ValidataAndCompareCertInfo()
181 …"challenge is %" LOG_PUBLIC "s\n", reinterpret_cast<char *>(paramSet->params[g_index1].blob.data)); in ValidataAndCompareCertInfo()
182 …I("version is %" LOG_PUBLIC "s\n", reinterpret_cast<char *>(paramSet->params[g_index2].blob.data)); in ValidataAndCompareCertInfo()
183 …G_I("alias is %" LOG_PUBLIC "s\n", reinterpret_cast<char *>(paramSet->params[g_index3].blob.data)); in ValidataAndCompareCertInfo()
185 … ret |= strcmp(SEC_INFO_DATA, reinterpret_cast<char *>(paramSet->params[g_index0].blob.data)); in ValidataAndCompareCertInfo()
186 … ret |= strcmp(CHALLENGE_DATA, reinterpret_cast<char *>(paramSet->params[g_index1].blob.data)); in ValidataAndCompareCertInfo()
187 ret |= strcmp(VERSION_DATA, reinterpret_cast<char *>(paramSet->params[g_index2].blob.data)); in ValidataAndCompareCertInfo()
188 ret |= strcmp(ALIAS, reinterpret_cast<char *>(paramSet->params[g_index3].blob.data)); in ValidataAndCompareCertInfo()
191 …OG_I("udid is %" LOG_PUBLIC "s\n", reinterpret_cast<char *>(paramSet->params[g_index4].blob.data)); in ValidataAndCompareCertInfo()
192 …_LOG_I("sn is %" LOG_PUBLIC "s\n", reinterpret_cast<char *>(paramSet->params[g_index5].blob.data)); in ValidataAndCompareCertInfo()
[all …]
/base/security/certificate_manager/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl/cm_ipc/
Dcm_ipc_service_serialization.c38 int32_t CopyBlobToBuffer(const struct CmBlob *blob, const struct CmBlob *destBlob, uint32_t *destOf… in CopyBlobToBuffer() argument
41 ((destBlob->size - *destOffset) < (sizeof(blob->size) + ALIGN_SIZE(blob->size)))) { in CopyBlobToBuffer()
46 &(blob->size), sizeof(blob->size)) != EOK) { in CopyBlobToBuffer()
49 *destOffset += sizeof(blob->size); in CopyBlobToBuffer()
51 …if (memcpy_s(destBlob->data + *destOffset, destBlob->size - *destOffset, blob->data, blob->size) !… in CopyBlobToBuffer()
52 *destOffset -= sizeof(blob->size); in CopyBlobToBuffer()
55 *destOffset += ALIGN_SIZE(blob->size); in CopyBlobToBuffer()
75 *(outParams->blob) = param->blob; in GetNormalParam()
98 outParams->blob->data = NULL; in GetNullBlobParam()
99 outParams->blob->size = 0; in GetNullBlobParam()

12345678910