Home
last modified time | relevance | path

Searched refs:authId (Results 1 – 25 of 67) sorted by relevance

123

/base/security/huks/test/reliability/src/
Dapi_pressure_test.cpp466 void ImportKeyTest(const struct HksBlob *authId, const struct HksParamSet *paramInSet);
467 void ExportPublicKeyTest(const struct HksBlob *authId, const struct HksParamSet *paramInSet);
469 void GetKeyParamSetTest(const struct HksBlob *authId, const struct HksParamSet *paramInSet);
470 void KeyExistTest(const struct HksBlob *authId, const struct HksParamSet *paramInSet);
472 …void SignTest(const struct HksBlob *authId, const struct HksParamSet *paramInSet, const struct Hks…
473 …void VerifyTest(const struct HksBlob *authId, const struct HksParamSet *paramInSet, const struct H…
475 void EncryptTest(const struct HksBlob *authId, const struct HksParamSet *paramInSet);
476 void DecryptTest(const struct HksBlob *authId, const struct HksParamSet *paramInSet,
478 void AgreeKeyTest(const struct HksBlob *authId);
479 void DeriveKeyTest(const struct HksBlob *authId, const struct HksParamSet *paramInSet);
[all …]
Dpressure_test.cpp66 …int32_t LocalHksGenerate(const uint32_t keyLen, const struct HksBlob *authId, const struct HksPara…
70 int32_t PressureTest::LocalHksGenerate(const uint32_t keyLen, const struct HksBlob *authId, in LocalHksGenerate() argument
86 if (HksGenerateKey(authId, paramSetIn, paramOutSet) != HKS_SUCCESS) { in LocalHksGenerate()
176 struct HksBlob authId = { strlen(GENERATE_KEY), (uint8_t *)GENERATE_KEY }; variable
196 int32_t ret = HksGenerateKey(&authId, paramInSet, NULL);
201 HksDeleteKey(&authId, paramInSet);
215 struct HksBlob authId = { strlen(GENERATE_KEY), (uint8_t *)GENERATE_KEY }; variable
233 HksGenerateKey(&authId, paramInSet, NULL);
237 HksExportPublicKey(&authId, paramInSet, &pubKey);
248 HksDeleteKey(&authId, paramInSet);
[all …]
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/asymmetric_alg_test/
Dhks_export_test_mt.cpp39 struct HksBlob authId = { strlen(keyAliasString), (uint8_t *)keyAliasString }; variable
50 ret = HksGenerateKey(&authId, paramInSet, nullptr); in RunTestCase()
98 EXPECT_EQ(HksDeleteKey(&authId, nullptr), HKS_SUCCESS);
113 EXPECT_EQ(HksDeleteKey(&authId, nullptr), HKS_SUCCESS);
126 EXPECT_EQ(HksDeleteKey(&authId, nullptr), HKS_SUCCESS);
141 EXPECT_EQ(HksDeleteKey(&authId, nullptr), HKS_SUCCESS);
159 EXPECT_EQ(HksDeleteKey(&authId, nullptr), HKS_SUCCESS);
175 EXPECT_EQ(HksDeleteKey(&authId, nullptr), HKS_SUCCESS);
188 EXPECT_EQ(HksExportPublicKey(&authId, nullptr, &publicKey), HKS_ERROR_INSUFFICIENT_DATA);
190 EXPECT_EQ(HksDeleteKey(&authId, nullptr), HKS_SUCCESS);
[all …]
/base/security/device_auth/services/authenticators/src/account_unrelated/
Ddas_module.c31 …sterDasLocalIdentity(const char *pkgName, const char *serviceType, Uint8Buff *authId, int userType) in RegisterDasLocalIdentity() argument
33 return RegisterLocalIdentityInTask(pkgName, serviceType, authId, userType); in RegisterDasLocalIdentity()
36 …sterDasLocalIdentity(const char *pkgName, const char *serviceType, Uint8Buff *authId, int userType) in UnregisterDasLocalIdentity() argument
38 return UnregisterLocalIdentityInTask(pkgName, serviceType, authId, userType); in UnregisterDasLocalIdentity()
41 …eleteDasPeerAuthInfo(const char *pkgName, const char *serviceType, Uint8Buff *authId, int userType) in DeleteDasPeerAuthInfo() argument
43 return DeletePeerAuthInfoInTask(pkgName, serviceType, authId, userType); in DeleteDasPeerAuthInfo()
46 static int32_t GetDasPublicKey(const char *pkgName, const char *serviceType, Uint8Buff *authId, int… in GetDasPublicKey() argument
49 return GetPublicKeyInTask(pkgName, serviceType, authId, userType, returnPk); in GetDasPublicKey()
Ddas_task_common.c204 const Uint8Buff *authId, Uint8Buff *keyAliasHash) in CombineKeyAlias() argument
208 keyAliasBuff.length = serviceId->length + authId->length + keyType->length; in CombineKeyAlias()
231 …if (memcpy_s(keyAliasBuff.val + usedLen, totalLen - usedLen, authId->val, authId->length) != EOK) { in CombineKeyAlias()
248 const Uint8Buff *authId, Uint8Buff *outKeyAlias) in CombineKeyAliasForIso() argument
253 int32_t res = CombineKeyAlias(serviceId, keyType, authId, outKeyAlias); in CombineKeyAliasForIso()
262 const Uint8Buff *authId, Uint8Buff *outKeyAlias) in CombineKeyAliasForPake() argument
277 res = CombineKeyAlias(serviceId, keyType, authId, &keyAliasHash); in CombineKeyAliasForPake()
301 const KeyAliasType keyType, const Uint8Buff *authId, Uint8Buff *outKeyAlias) in GenerateKeyAlias() argument
307 CHECK_PTR_RETURN_ERROR_CODE(authId, "authId"); in GenerateKeyAlias()
308 CHECK_PTR_RETURN_ERROR_CODE(authId->val, "authId->val"); in GenerateKeyAlias()
[all …]
/base/security/device_auth/services/frameworks/src/module/
Ddev_auth_module_manager.c45 …ol IsParamsForDasTokenManagerValid(const char *pkgName, const char *serviceType, Uint8Buff *authId, in IsParamsForDasTokenManagerValid() argument
52 if (pkgName == NULL || serviceType == NULL || authId == NULL || authId->val == NULL) { in IsParamsForDasTokenManagerValid()
57 if (HcStrlen(pkgName) == 0 || HcStrlen(serviceType) == 0 || authId->length == 0) { in IsParamsForDasTokenManagerValid()
68 int32_t RegisterLocalIdentity(const char *pkgName, const char *serviceType, Uint8Buff *authId, int … in RegisterLocalIdentity() argument
71 if (!IsParamsForDasTokenManagerValid(pkgName, serviceType, authId, userType, moduleType)) { in RegisterLocalIdentity()
81 int32_t res = dasModule->registerLocalIdentity(pkgName, serviceType, authId, userType); in RegisterLocalIdentity()
89 int32_t UnregisterLocalIdentity(const char *pkgName, const char *serviceType, Uint8Buff *authId, in… in UnregisterLocalIdentity() argument
92 if (!IsParamsForDasTokenManagerValid(pkgName, serviceType, authId, userType, moduleType)) { in UnregisterLocalIdentity()
102 int32_t res = dasModule->unregisterLocalIdentity(pkgName, serviceType, authId, userType); in UnregisterLocalIdentity()
110 int32_t DeletePeerAuthInfo(const char *pkgName, const char *serviceType, Uint8Buff *authId, int use… in DeletePeerAuthInfo() argument
[all …]
/base/security/device_auth/services/frameworks/inc/module/
Ddev_auth_module_manager.h39 Uint8Buff *authId; member
55 int32_t RegisterLocalIdentity(const char *pkgName, const char *serviceType, Uint8Buff *authId, int …
57 int32_t UnregisterLocalIdentity(const char *pkgName, const char *serviceType, Uint8Buff *authId, in…
59 int32_t DeletePeerAuthInfo(const char *pkgName, const char *serviceType, Uint8Buff *authId, int use…
/base/security/huks/services/huks_standard/huks_engine/main/core/include/
Dhks_auth.h41 int32_t HksAuth(uint32_t authId, const struct HksKeyNode *keyNode, const struct HksParamSet *paramS…
43 int32_t HksThreeStageAuth(uint32_t authId, const struct HuksKeyNode *keyNode);
/base/security/device_auth/test/unittest/deviceauth/source/
Dstandard_exchange_task_test.cpp74 uint8_t authId[AUTH_ID_LENGTH] = { 0 }; variable
75 (void)memcpy_s(authId, AUTH_ID_LENGTH, TEST_AUTH_ID.c_str(), AUTH_ID_LENGTH);
76 pakeParams.baseParams.idSelf.val = authId;
126 uint8_t authId[AUTH_ID_LENGTH] = { 0 }; variable
127 (void)memcpy_s(authId, AUTH_ID_LENGTH, TEST_AUTH_ID.c_str(), AUTH_ID_LENGTH);
128 pakeParams.baseParams.idSelf.val = authId;
/base/security/huks/services/huks_standard/huks_engine/main/core/src/
Dhks_auth.c27 uint32_t authId; member
155 int32_t HksAuth(uint32_t authId, const struct HksKeyNode *keyNode, const struct HksParamSet *paramS… in HksAuth() argument
170 if (authId == g_authPolicyList[i].authId) { in HksAuth()
177 int32_t HksThreeStageAuth(uint32_t authId, const struct HuksKeyNode *keyNode) in HksThreeStageAuth() argument
180 if (authId == g_authPolicyList[i].authId) { in HksThreeStageAuth()
/base/security/device_auth/services/authenticators/src/account_unrelated/pake_task/
Dpake_task_common.c137 const char *authId = GetStringFromJson(in, FIELD_SELF_AUTH_ID); in FillAuthId() local
138 if (authId == NULL) { in FillAuthId()
142 uint32_t authIdLen = strlen(authId); in FillAuthId()
153 …(params->baseParams.idSelf.val, params->baseParams.idSelf.length, authId, strlen(authId)) != EOK) { in FillAuthId()
159 authId = GetStringFromJson(in, FIELD_PEER_AUTH_ID); in FillAuthId()
160 if (authId == NULL) { in FillAuthId()
164 authIdLen = strlen(authId); in FillAuthId()
175 …(params->baseParams.idPeer.val, params->baseParams.idPeer.length, authId, strlen(authId)) != EOK) { in FillAuthId()
/base/security/device_auth/services/authenticators/src/account_unrelated/pake_task/standard_exchange_task/
Ddas_standard_token_manager.c21 …egisterLocalIdentity(const char *pkgName, const char *serviceType, Uint8Buff *authId, int userType) in RegisterLocalIdentity() argument
29 int32_t res = GenerateKeyAlias(&pkgNameBuff, &serviceTypeBuff, keyType, authId, &keyAliasBuff); in RegisterLocalIdentity()
41 …ExtraInfo exInfo = { *authId, -1, -1 }; /* UserType and pairType are not required when generating … in RegisterLocalIdentity()
52 …egisterLocalIdentity(const char *pkgName, const char *serviceType, Uint8Buff *authId, int userType) in UnregisterLocalIdentity() argument
60 …int32_t res = GenerateKeyAlias(&pkgNameBuff, &serviceTypeBuff, keyType, authId, &pakeKeyAliasBuff); in UnregisterLocalIdentity()
175 static int32_t GetPublicKey(const char *pkgName, const char *serviceType, Uint8Buff *authId, int us… in GetPublicKey() argument
184 int32_t res = GenerateKeyAlias(&pkgNameBuff, &serviceTypeBuff, keyType, authId, &keyAliasBuff); in GetPublicKey()
/base/security/device_auth/services/session_manager/src/session/v1/compatible_bind_sub_session/
Dcompatible_bind_sub_session_common.c131 …kAuthIdAndUserTypeValid(int32_t osAccountId, int userType, const char *groupId, const char *authId) in CheckAuthIdAndUserTypeValid() argument
153 const char *oriAuthId = StringGet(&deviceInfo->authId); in CheckAuthIdAndUserTypeValid()
154 …if ((deviceInfo->devType != userType) || ((oriAuthId != NULL) && (strcmp(oriAuthId, authId) != 0))… in CheckAuthIdAndUserTypeValid()
172 const char *authId = GetStringFromJson(jsonParams, FIELD_DEVICE_ID); in AddAuthIdAndUserTypeIfValidOrDefault() local
174 if (authId == NULL) { in AddAuthIdAndUserTypeIfValidOrDefault()
181 authId = udid; in AddAuthIdAndUserTypeIfValidOrDefault()
183 int32_t result = CheckAuthIdAndUserTypeValid(osAccountId, userType, groupId, authId); in AddAuthIdAndUserTypeIfValidOrDefault()
191 if (AddStringToJson(params, FIELD_AUTH_ID, authId) != HC_SUCCESS) { in AddAuthIdAndUserTypeIfValidOrDefault()
284 if (AddStringToJson(params, FIELD_AUTH_ID, StringGet(&devAuthParams->authId)) != HC_SUCCESS) { in AddDevInfoToParams()
373 const char *authId = GetStringFromJson(session->params, FIELD_AUTH_ID); in AddGroupAndDevInfoToParams() local
[all …]
/base/security/device_auth/services/authenticators/inc/account_unrelated/
Ddas_task_main.h43 int32_t RegisterLocalIdentityInTask(const char *pkgName, const char *serviceType, Uint8Buff *authId
44 …LocalIdentityInTask(const char *pkgName, const char *serviceType, Uint8Buff *authId, int userType);
/base/security/device_auth/services/authenticators/src/account_unrelated/iso_task/
Diso_task_common.c294 const char *authId = GetStringFromJson(in, FIELD_SELF_AUTH_ID); in FillAuthId() local
295 if (authId == NULL) { in FillAuthId()
299 uint32_t authIdLen = strlen(authId); in FillAuthId()
311 authId, strlen(authId)) != EOK) { in FillAuthId()
320 authId = GetStringFromJson(in, FIELD_PEER_AUTH_ID); in FillAuthId()
321 if (authId == NULL) { in FillAuthId()
325 authIdLen = strlen(authId); in FillAuthId()
337 authId, strlen(authId)) != EOK) { in FillAuthId()
538 Uint8Buff authId = { NULL, 0 }; in GenerateKeyAliasInIso() local
540 authId.val = params->baseParams.authIdPeer.val; in GenerateKeyAliasInIso()
[all …]
/base/security/device_auth/services/creds_manager/src/account_related/
Daccount_related_creds_manager.c136 static int32_t GetSharedSecretForAccountInPake(const char *userId, const char *authId, in GetSharedSecretForAccountInPake() argument
145 int32_t ret = GetAccountAuthTokenManager()->generateKeyAlias(userId, authId, &aliasBuff, false); in GetSharedSecretForAccountInPake()
218 static int32_t GetCertInfo(int32_t osAccountId, const char *userId, const char *authId, CertInfo *c… in GetCertInfo() argument
225 int32_t ret = GetAccountAuthTokenManager()->getToken(osAccountId, token, userId, authId); in GetCertInfo()
241 …tic int32_t GetAccountAsymIdentityInfo(int32_t osAccountId, const char *userId, const char *authId, in GetAccountAsymIdentityInfo() argument
244 int32_t ret = GetCertInfo(osAccountId, userId, authId, &info->proof.certInfo); in GetAccountAsymIdentityInfo()
311 const char *devIdSelf = StringGet(&deviceEntry->authId); in GenerateAuthTokenForAccessory()
361 const char *devIdPeer = StringGet(&deviceEntry->authId); in GenerateTokenAliasForController()
417 const char *authId = StringGet(&deviceEntry->authId); in GetSelfAccountIdentityInfo() local
418 ret = GetAccountAsymIdentityInfo(osAccountId, userId, authId, info, isNeedGeneratePdid); in GetSelfAccountIdentityInfo()
[all …]
/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/alg_module_test/src/
Dhks_rsa_common_mt.cpp166 struct HksBlob authId = { in EncryptServiceTestCase() local
202 EXPECT_EQ(HksImportKey(&authId, paramInSet, &x509Key), HKS_SUCCESS); in EncryptServiceTestCase()
206 … EXPECT_EQ(HksEncrypt(&authId, paramInSet, &plainText, &cipherText), testCaseParams.encryptResult); in EncryptServiceTestCase()
221 (void)HksDeleteKey(&authId, nullptr); in EncryptServiceTestCase()
294 struct HksBlob authId = { in DecryptServiceTestCase() local
309 EXPECT_EQ(HksGenerateKey(&authId, paramInSet, paramSetOut), HKS_SUCCESS); in DecryptServiceTestCase()
313 EXPECT_EQ(HksExportPublicKey(&authId, paramInSet, &opensslRsaKeyInfo), HKS_SUCCESS); in DecryptServiceTestCase()
338 …EXPECT_EQ(HksDecrypt(&authId, paramInSet, &cipherText, &decryptedText), testCaseParams.decryptResu… in DecryptServiceTestCase()
346 (void)HksDeleteKey(&authId, nullptr); in DecryptServiceTestCase()
419 struct HksBlob authId = { .size = testCaseParams.alias.length(), in SignServiceTestCase() local
[all …]
Dhks_hmac_mt.cpp291 …void LocalHmacScenario(int32_t scenario, struct HksBlob *authId, const TestCaseParams &testCasePar… in LocalHmacScenario() argument
310 … EXPECT_EQ(HksGenerateKey(authId, paramInSet, paramOutSet), testCaseParams.generateKeyResult); in LocalHmacScenario()
312 EXPECT_EQ(HmacGenerateKey(HMAC_KEY_SIZE, authId), testCaseParams.generateKeyResult); in LocalHmacScenario()
329 HksFree(authId->data); in LocalHmacScenario()
340 struct HksBlob authId = { (uint32_t)strlen(HMAC_KEY), (uint8_t *)HMAC_KEY }; in RunTestCase() local
357 LocalHmacScenario(scenario, &authId, testCaseParams, &macForHuks, &message); in RunTestCase()
359 EXPECT_EQ(HksGenerateKey(&authId, paramInSet, NULL), testCaseParams.generateKeyResult); in RunTestCase()
360 … EXPECT_EQ(HksMac(&authId, paramInSet, &message, &macForHuks), testCaseParams.hmacResult); in RunTestCase()
363 (void)HksDeleteKey(&authId, nullptr); in RunTestCase()
/base/security/device_auth/services/session_manager/inc/session/v2/auth_sub_session/protocol_lib/
Diso_protocol.h24 Uint8Buff authId; member
Dec_speke_protocol.h30 Uint8Buff authId; member
/base/security/device_auth/services/group_manager/src/group_operation/
Dgroup_operation_common.c82 params.authId = deviceId; in GetTrustedDeviceEntryById()
269 params.authId = peerDeviceId; in GetRelatedGroups()
417 const char *authId = StringGet(&deviceInfo->authId); in AddAuthIdToReturn() local
418 if (authId == NULL) { in AddAuthIdToReturn()
422 if (AddStringToJson(json, FIELD_AUTH_ID, authId) != HC_SUCCESS) { in AddAuthIdToReturn()
741 const char *authId = GetStringFromJson(jsonParams, FIELD_DEVICE_ID); in AddAuthIdToParamsOrDefault() local
743 if (authId == NULL) { in AddAuthIdToParamsOrDefault()
750 authId = udid; in AddAuthIdToParamsOrDefault()
752 if (!StringSetPointer(&devParams->authId, authId)) { in AddAuthIdToParamsOrDefault()
761 const char *authId = GetStringFromJson(jsonParams, FIELD_DEVICE_ID); in AddAuthIdToParams() local
[all …]
/base/security/device_auth/services/authenticators/src/account_unrelated/iso_task/lite_exchange_task/
Ddas_lite_token_manager.c22 …egisterLocalIdentity(const char *pkgName, const char *serviceType, Uint8Buff *authId, int userType) in UnregisterLocalIdentity() argument
31 …int32_t res = GenerateKeyAlias(&pkgNameBuff, &serviceTypeBuff, KEY_ALIAS_AUTH_TOKEN, authId, &isoK… in UnregisterLocalIdentity()
/base/security/device_auth/services/session_manager/inc/session/v2/expand_sub_session/expand_process_lib/
Dpub_key_exchange.h27 Uint8Buff authId; member
Dauth_code_import.h27 Uint8Buff authId; member
Dsave_trusted_info.h30 const char *authId; member

123