| /base/security/device_auth/test/unittest/deviceauth/source/ |
| D | key_agree_sdk_test.cpp | 55 g_session = (KeyAgreeSession *)HcMalloc(sizeof(KeyAgreeSession), 0); in SetUpTestCase() 56 g_session_s = (KeyAgreeSession *)HcMalloc(sizeof(KeyAgreeSession), 0); in SetUpTestCase() 129 g_session = (KeyAgreeSession *)HcMalloc(sizeof(KeyAgreeSession), 0); in SetUpTestCase() 130 g_session_s = (KeyAgreeSession *)HcMalloc(sizeof(KeyAgreeSession), 0); in SetUpTestCase() 133 g_sharedSecret.data = (uint8_t *)HcMalloc(g_sharedSecret.length, 0); in SetUpTestCase() 137 g_deviceId.data = (uint8_t *)HcMalloc(g_deviceId.length, 0); in SetUpTestCase() 141 g_deviceId_s.data = (uint8_t *)HcMalloc(g_deviceId_s.length, 0); in SetUpTestCase() 210 g_session = (KeyAgreeSession *)HcMalloc(sizeof(KeyAgreeSession), 0); in SetUpTestCase() 211 g_session_s = (KeyAgreeSession *)HcMalloc(sizeof(KeyAgreeSession), 0); in SetUpTestCase() 214 g_sharedSecret.data = (uint8_t *)HcMalloc(g_sharedSecret.length, g_sharedSecretLength); in SetUpTestCase() [all …]
|
| D | device_auth_ext_mock.c | 41 ExtPluginNode *node = (ExtPluginNode *)HcMalloc(sizeof(ExtPluginNode), 0); in CreateNode() 46 node->plugin = (ExtPlugin *)HcMalloc(sizeof(ExtPlugin), 0); in CreateNode() 91 extPart->instance = (ExtPart *)HcMalloc(sizeof(ExtPart), 0); in InitExtPart()
|
| /base/security/device_auth/deps_adapter/os_adapter/interfaces/ |
| D | hc_types.h | 39 #define HcMalloc(size, val) MockMalloc(size, val, __FILE__, __LINE__) macro 46 void* HcMalloc(uint32_t size, char val);
|
| /base/security/device_auth/services/legacy/authenticators/src/account_unrelated/iso_task/lite_exchange_task/ |
| D | iso_server_bind_exchange_task.c | 83 encData = (uint8_t *)HcMalloc(ENC_CHALLENGE_LEN, 0); in DecryptChallenge() 89 nonce = (uint8_t *)HcMalloc(NONCE_SIZE, 0); in DecryptChallenge() 119 uint8_t *authCode = (uint8_t *)HcMalloc(AUTH_CODE_LEN, 0); in GenAndEncAuthCode() 144 keyAlias = (uint8_t *)HcMalloc(ISO_KEY_ALIAS_LEN, 0); in GenAndEncAuthCode() 178 nonce = (uint8_t *)HcMalloc(NONCE_SIZE, 0); in GenerateAuthCodeAndImport() 183 encAuthCode = (uint8_t *)HcMalloc(AUTH_CODE_LEN + TAG_LEN, 0); in GenerateAuthCodeAndImport() 225 uint8_t *challenge = (uint8_t *)HcMalloc(CHALLENGE_SIZE, 0); in ServerBindExchangeStart() 249 …IsoServerBindExchangeTask *task = (IsoServerBindExchangeTask *)HcMalloc(sizeof(IsoServerBindExchan… in CreateServerBindExchangeTask()
|
| D | iso_client_bind_exchange_task.c | 45 uint8_t *keyAlias = (uint8_t *)HcMalloc(ISO_KEY_ALIAS_LEN, 0); in DecAndImportInner() 88 nonce = (uint8_t *)HcMalloc(NONCE_SIZE, 0); in DecAndImportAuthCode() 93 encData = (uint8_t *)HcMalloc(encDataLen, 0); in DecAndImportAuthCode() 102 authCode = (uint8_t *)HcMalloc(AUTH_CODE_LEN, 0); in DecAndImportAuthCode() 165 *nonce = (uint8_t *)HcMalloc(NONCE_SIZE, 0); in ClientBindAesEncrypt() 176 *encData = (uint8_t *)HcMalloc(sizeof(task->challenge) + TAG_LEN, 0); in ClientBindAesEncrypt() 239 …IsoClientBindExchangeTask *task = (IsoClientBindExchangeTask *)HcMalloc(sizeof(IsoClientBindExchan… in CreateClientBindExchangeTask()
|
| /base/security/device_auth/services/legacy/authenticators/src/account_unrelated/iso_task/ |
| D | iso_task_common.c | 29 uint8_t *hkdfSalt = (uint8_t *)HcMalloc(hkdfSaltLen, 0); in GenerateReturnKey() 94 out = (uint8_t *)HcMalloc((sizeof(int) + TAG_LEN), 0); in GenerateEncResult() 134 returnSessionKey = (uint8_t *)HcMalloc(params->keyLen, 0); in SendResultToFinalSelf() 179 returnKey = (uint8_t *)HcMalloc(params->keyLen, 0); in GenEncResult() 213 nonce = (uint8_t *)HcMalloc(NONCE_SIZE, 0); in CheckEncResult() 219 encResult = (uint8_t *)HcMalloc(sizeof(int) + TAG_LEN, 0); in CheckEncResult() 247 uint8_t *keyAlias = (uint8_t *)HcMalloc(ISO_KEY_ALIAS_LEN, 0); in DeleteAuthCode() 305 … params->baseParams.authIdSelf.val = (uint8_t *)HcMalloc(params->baseParams.authIdSelf.length, 0); in FillAuthId() 331 … params->baseParams.authIdPeer.val = (uint8_t *)HcMalloc(params->baseParams.authIdPeer.length, 0); in FillAuthId() 353 params->serviceType = (char *)HcMalloc((uint32_t)(strlen(serviceType) + 1), 0); in FillPkgNameAndServiceType() [all …]
|
| /base/security/device_auth/services/protocol/src/pake_protocol/pake_v2_protocol/ |
| D | pake_v2_protocol_common.c | 75 params->salt.val = (uint8_t *)HcMalloc(params->salt.length, 0); in AllocDefaultParams() 82 params->sharedSecret.val = (uint8_t *)HcMalloc(params->sharedSecret.length, 0); in AllocDefaultParams() 89 params->sessionKey.val = (uint8_t *)HcMalloc(params->sessionKey.length, 0); in AllocDefaultParams() 96 params->kcfData.val = (uint8_t *)HcMalloc(params->kcfData.length, 0); in AllocDefaultParams() 103 params->kcfDataPeer.val = (uint8_t *)HcMalloc(params->kcfDataPeer.length, 0); in AllocDefaultParams() 213 idSelfMsg.val = (uint8_t *)HcMalloc(idSelfMsg.length, 0); in ComputeSidSelf() 245 idPeerMsg.val = (uint8_t *)HcMalloc(idPeerMsg.length, 0); in ComputeSidPeer() 279 sidSelf.val = (uint8_t *)HcMalloc(sidSelf.length, 0); in ComputeSid() 284 sidPeer.val = (uint8_t *)HcMalloc(sidPeer.length, 0); in ComputeSid() 334 sharedSecretMsg.val = (uint8_t *)HcMalloc(sharedSecretMsg.length, 0); in ComputeSharedSecret() [all …]
|
| /base/security/device_auth/services/identity_manager/src/ |
| D | identity_pin.c | 24 ProtocolEntity *dlSpekeEntity = (ProtocolEntity *)HcMalloc(sizeof(ProtocolEntity), 0); in SetDlSpekeProtocol() 46 ProtocolEntity *isoEntity = (ProtocolEntity *)HcMalloc(sizeof(ProtocolEntity), 0); in SetIsoProtocol() 94 ProtocolEntity *ecSpekeEntity = (ProtocolEntity *)HcMalloc(sizeof(ProtocolEntity), 0); in SetProtocolsForPinType() 121 ProtocolEntity *ecSpekeEntity = (ProtocolEntity *)HcMalloc(sizeof(ProtocolEntity), 0); in SetProtocolsForDirectAuth() 274 uint8_t *seedVal = (uint8_t *)HcMalloc(SEED_LEN, 0); in GetSharedSecretForPinInIso() 286 uint8_t *pskVal = (uint8_t *)HcMalloc(ISO_PSK_LEN, 0); in GetSharedSecretForPinInIso() 315 sharedSecret->val = (uint8_t *)HcMalloc(pinLen, 0); in GetSharedSecretForPinInPake()
|
| D | cert_operation.c | 36 ProtocolEntity *entity = (ProtocolEntity *)HcMalloc(sizeof(ProtocolEntity), 0); in SetProtocolsForUidType() 188 uint8_t *keyAliasValue = (uint8_t *)HcMalloc(SHA256_LEN, 0); in VerifyPeerCertInfo() 223 peerPkBuff->val = (uint8_t *)HcMalloc(pkSize, 0); in GetPeerPubKeyFromCert() 243 uint8_t *priAliasVal = (uint8_t *)HcMalloc(SHA256_LEN, 0); in GetSharedSecretForAccountInPake() 264 sharedSecret->val = (uint8_t *)HcMalloc(sharedKeyAliasLen, 0); in GetSharedSecretForAccountInPake() 287 certInfo->pkInfoStr.val = (uint8_t *)HcMalloc(pkInfoLen, 0); in GenerateCertInfo() 300 certInfo->pkInfoSignature.val = (uint8_t *)HcMalloc(signatureLen, 0); in GenerateCertInfo() 349 ProtocolEntity *ecSpekeEntity = (ProtocolEntity *)HcMalloc(sizeof(ProtocolEntity), 0); in GetAccountAsymIdentityInfo() 418 authToken->val = (uint8_t *)HcMalloc(AUTH_TOKEN_SIZE, 0); in GenerateAuthTokenForAccessory() 450 authTokenAlias->val = (uint8_t *)HcMalloc(SHA256_LEN, 0); in GenerateTokenAliasForController() [all …]
|
| D | identity_common.c | 34 sharedSecret->val = (uint8_t *)HcMalloc(len + 1, 0); in ConvertPsk() 53 preSharedUrl->val = (uint8_t *)HcMalloc(urlLen + 1, 0); in SetPreSharedUrlForProof() 144 IdentityInfo *info = (IdentityInfo *)HcMalloc(sizeof(IdentityInfo), 0); in CreateIdentityInfo()
|
| /base/security/device_auth/common_lib/impl/src/ |
| D | uint8buff_utils.c | 30 buff->val = (uint8_t *)HcMalloc(buffLen, 0); in InitUint8Buff() 46 uint8_t *val = (uint8_t *)HcMalloc(buff->length, 0); in DeepCopyUint8Buff()
|
| /base/security/device_auth/services/protocol/src/pake_protocol/pake_v1_protocol/ |
| D | pake_v1_protocol_common.c | 71 params->salt.val = (uint8_t *)HcMalloc(params->salt.length, 0); in AllocDefaultParams() 78 params->challengeSelf.val = (uint8_t *)HcMalloc(params->challengeSelf.length, 0); in AllocDefaultParams() 85 params->challengePeer.val = (uint8_t *)HcMalloc(params->challengePeer.length, 0); in AllocDefaultParams() 92 params->sessionKey.val = (uint8_t *)HcMalloc(params->sessionKey.length, 0); in AllocDefaultParams() 99 params->hmacKey.val = (uint8_t *)HcMalloc(params->hmacKey.length, 0); in AllocDefaultParams() 106 params->kcfData.val = (uint8_t *)HcMalloc(params->kcfData.length, 0); in AllocDefaultParams() 113 params->kcfDataPeer.val = (uint8_t *)HcMalloc(params->kcfDataPeer.length, 0); in AllocDefaultParams() 228 unionKey.val = (uint8_t *)HcMalloc(unionKey.length, 0); in DeriveKeyFromSharedSecret()
|
| /base/security/device_auth/services/legacy/authenticators/src/account_related/auth/iso_auth_task/ |
| D | iso_auth_task_common.c | 48 params->userIdSelf = (char *)HcMalloc(DEV_AUTH_USER_ID_SIZE, 0); in FillUserId() 53 params->userIdPeer = (char *)HcMalloc(DEV_AUTH_USER_ID_SIZE, 0); in FillUserId() 94 params->deviceIdSelf = (char *)HcMalloc(selfDeviceIdLen + 1, 0); in FillPayload() 126 params->challenge.val = (uint8_t *)HcMalloc(params->challenge.length, 0); in SetChallenge() 296 params->devIdPeer.val = (uint8_t *)HcMalloc(devIdPeerHexLen / BYTE_TO_HEX_OPER_LENGTH + 1, 0); in GetPayloadValue() 312 params->deviceIdPeer = (char *)HcMalloc(deviceIdPeerLen + 1, 0); in GetPayloadValue() 358 char *combineString = (char *)HcMalloc(len, 0); in ExtractAndVerifyPayload()
|
| /base/security/device_auth/services/legacy/authenticators/src/account_unrelated/pake_task/ |
| D | pake_task_common.c | 148 params->baseParams.idSelf.val = (uint8_t *)HcMalloc(params->baseParams.idSelf.length, 0); in FillAuthId() 170 params->baseParams.idPeer.val = (uint8_t *)HcMalloc(params->baseParams.idPeer.length, 0); in FillAuthId() 205 params->packageName = (char *)HcMalloc(strlen(packageName) + 1, 0); in FillPkgNameAndServiceType() 220 params->serviceType = (char *)HcMalloc(strlen(serviceType) + 1, 0); in FillPkgNameAndServiceType() 237 params->nonce.val = (uint8_t *)HcMalloc(params->nonce.length, 0); in FillNonce()
|
| /base/security/device_auth/services/legacy/authenticators/src/account_unrelated/iso_task/iso_protocol_task/ |
| D | iso_server_protocol_task.c | 83 uint8_t *selfToken = (uint8_t *)HcMalloc(ISO_TOKEN_LEN, 0); in IsoServerStart() 173 peerToken = (uint8_t *)HcMalloc(ISO_TOKEN_LEN, 0); in CalTokenAndGenSessionKey() 182 tokenSelf = (uint8_t *)HcMalloc(ISO_TOKEN_LEN, 0); in CalTokenAndGenSessionKey() 244 … IsoProtocolServerTask *task = (IsoProtocolServerTask *)HcMalloc(sizeof(IsoProtocolServerTask), 0); in CreateProtocolServerTask()
|
| /base/security/device_auth/services/legacy/authenticators/src/account_related/creds_manager/ |
| D | asy_token_manager.c | 236 char *fileData = (char *)HcMalloc(fileSize, 0); in ReadTokensFromFile() 373 uint8_t *aliasStr = (uint8_t *)HcMalloc(aliasStrLen, 0); in GenerateKeyAlias() 471 uint8_t *keyAliasValue = (uint8_t *)HcMalloc(SHA256_LEN, 0); in DoImportServerPkAndVerify() 516 uint8_t *signature = (uint8_t *)HcMalloc(SIGNATURE_SIZE, 0); in VerifySignature() 526 uint8_t *serverPk = (uint8_t *)HcMalloc(SERVER_PK_SIZE, 0); in VerifySignature() 688 uint8_t *publicKeyVal = (uint8_t *)HcMalloc(PK_SIZE, 0); in DoExportPkAndCompare() 731 uint8_t *devicePk = (uint8_t *)HcMalloc(PK_SIZE, 0); in CheckDevicePk() 741 uint8_t *keyAliasValue = (uint8_t *)HcMalloc(SHA256_LEN, 0); in CheckDevicePk() 855 uint8_t *keyAliasValue = (uint8_t *)HcMalloc(SHA256_LEN, 0); in GetRegisterProof() 864 uint8_t *publicKeyVal = (uint8_t *)HcMalloc(PK_SIZE, 0); in GetRegisterProof() [all …]
|
| /base/security/device_auth/deps_adapter/os_adapter/impl/src/linux/ |
| D | hc_types.c | 24 void* HcMalloc(uint32_t size, char val) in HcMalloc() function
|
| /base/security/device_auth/services/legacy/authenticators/src/account_unrelated/ |
| D | das_task_common.c | 157 serviceIdPlain.val = (uint8_t *)HcMalloc(serviceIdPlain.length, 0); in CombineServiceId() 192 keyAliasBuff.val = (uint8_t *)HcMalloc(keyAliasBuff.length, 0); in CombineKeyAlias() 254 keyAliasHash.val = (uint8_t *)HcMalloc(keyAliasHash.length, 0); in CombineKeyAliasForPake() 266 outKeyAliasHex = (char *)HcMalloc(outKeyAliasHexLen, 0); in CombineKeyAliasForPake() 306 serviceId.val = (uint8_t *)HcMalloc(serviceId.length, 0); in GenerateKeyAlias() 377 uint8_t *authIdPeerTmp = (uint8_t *)HcMalloc(authIdPeerLen, 0); in GetAndCheckAuthIdPeer()
|
| /base/security/device_auth/deps_adapter/os_adapter/impl/src/liteos/ |
| D | hc_types.c | 22 void *HcMalloc(uint32_t size, char val) in HcMalloc() function
|
| /base/security/device_auth/services/frameworks/src/plugin_adapter/ |
| D | account_lifecycle_plugin_proxy.c | 76 WorkerTask *baseTask = (WorkerTask *)HcMalloc(sizeof(WorkerTask), 0); in ExecuteWorkerTask() 97 … g_accountPluginCtx = (AccountLifecyleExtPlugCtx *)HcMalloc(sizeof(AccountLifecyleExtPlugCtx), 0); in InitAccountLifecyclePluginCtx()
|
| /base/security/device_auth/services/protocol/src/iso_protocol/ |
| D | iso_protocol_common.c | 32 params->randSelf.val = (uint8_t *)HcMalloc(params->randSelf.length, 0); in InitIsoBaseParams() 39 params->randPeer.val = (uint8_t *)HcMalloc(params->randPeer.length, 0); in InitIsoBaseParams() 47 params->sessionKey.val = (uint8_t *)HcMalloc(params->sessionKey.length, 0); in InitIsoBaseParams() 93 uint8_t *messagePeer = (uint8_t *)HcMalloc(length, 0); in IsoCalSelfToken() 138 uint8_t *messageSelf = (uint8_t *)HcMalloc(length, 0); in IsoCalPeerToken() 209 uint8_t *hkdfSalt = (uint8_t *)HcMalloc(hkdfSaltLen, 0); in IsoGenSessionKey()
|
| /base/security/device_auth/services/legacy/authenticators/src/account_unrelated/pake_task/standard_exchange_task/ |
| D | standard_exchange_message_util.c | 29 uint8_t *exAuthInfoVal = (uint8_t *)HcMalloc(exAuthInfoLen, 0); in PackageNonceAndCipherToJson() 63 exAuthInfoVal = (uint8_t *)HcMalloc(exAuthInfoLen, 0); in ParseNonceAndCipherFromJson()
|
| /base/security/device_auth/services/protocol/src/ |
| D | protocol_common.c | 44 param->val = (uint8_t *)HcMalloc(param->length, 0); in InitSingleParam()
|
| /base/security/device_auth/services/legacy/group_manager/src/callback_manager/ |
| D | callback_manager.c | 59 char *copyAppId = (char *)HcMalloc(appIdLen, 0); in AddCallbackIfNotExist() 69 … DeviceAuthCallback *copyCallback = (DeviceAuthCallback *)HcMalloc(sizeof(DeviceAuthCallback), 0); in AddCallbackIfNotExist() 218 g_callbackMutex = (HcMutex *)HcMalloc(sizeof(HcMutex), 0); in InitCallbackManager()
|
| /base/security/device_auth/services/frameworks/src/task_manager/ |
| D | task_manager.c | 39 g_taskThread = (HcTaskThread *)HcMalloc(sizeof(HcTaskThread), 0); in InitTaskManager()
|