Home
last modified time | relevance | path

Searched refs:challenge (Results 1 – 25 of 208) sorted by relevance

123456789

/base/useriam/user_auth_framework/test/unittest/services/src/
Duser_idm_session_controller_test.cpp49 std::vector<uint8_t> challenge; variable
54 EXPECT_EQ(true, UserIdmSessionController::Instance().OpenSession(userId, challenge));
62 std::vector<uint8_t> challenge; variable
67 EXPECT_EQ(true, UserIdmSessionController::Instance().OpenSession(userId1, challenge));
68 EXPECT_EQ(true, UserIdmSessionController::Instance().OpenSession(userId2, challenge));
69 EXPECT_EQ(true, UserIdmSessionController::Instance().OpenSession(userId3, challenge));
75 std::vector<uint8_t> challenge; variable
80 EXPECT_EQ(false, UserIdmSessionController::Instance().OpenSession(userId, challenge));
88 std::vector<uint8_t> challenge; variable
90 auto fillUpChallenge = [&nonce](std::vector<uint8_t> &challenge) { challenge = nonce; }; in __anon8926d3270102() argument
[all …]
Duser_auth_service_test.cpp516 .challenge = {1, 2, 3, 4},
539 .challenge = {1, 2, 3, 4},
565 .challenge = {1, 2, 3, 4},
657 …lRepeatedly([&context](uint64_t contextId, int32_t authType, const std::vector<uint8_t> &challenge, in MockForIdentifyHdi()
778 authParam.challenge.push_back(1);
779 authParam.challenge.push_back(2);
780 authParam.challenge.push_back(3);
781 authParam.challenge.push_back(4);
797 authParam.challenge.push_back(1);
798 authParam.challenge.push_back(2);
[all …]
/base/security/device_auth/frameworks/deviceauth_lite/source/key_agreement/
Dpake_client.c197 pake_client->peer_challenge = receive->challenge; in parse_start_response_data()
257 struct challenge challenge = { 0, {0} }; in build_end_request_data() local
261 challenge.length = rand.length; in build_end_request_data()
262 if (memcpy_s(challenge.challenge, sizeof(challenge.challenge), rand.random_value, in build_end_request_data()
269 pake_client->self_challenge = challenge; in build_end_request_data()
271 send->challenge = challenge; in build_end_request_data()
339 struct uint8_buff challenge = { in generate_proof() local
345 challenge.val = (uint8_t *)MALLOC(challenge.size); in generate_proof()
346 if (challenge.val == NULL) { in generate_proof()
350 (void)memset_s(challenge.val, challenge.size, 0, challenge.size); in generate_proof()
[all …]
Dpake_server.h75 struct challenge self_challenge;
76 struct challenge peer_challenge;
99 struct challenge challenge; member
105 struct challenge challenge; member
Dsts_server.h64 struct challenge challenge; member
82 struct challenge peer_challenge;
83 struct challenge my_challenge;
104 struct challenge challenge; member
/base/security/device_security_level/services/dslm/
Ddslm_msg_utils.c33 static uint8_t *GenerateSecInfoResponseJson(uint64_t challenge, const DslmCredBuff *cred) in GenerateSecInfoResponseJson() argument
57 …DslmByteToHexString((uint8_t *)&challenge, sizeof(challenge), (uint8_t *)nonce, CHALLENGE_STRING_L… in GenerateSecInfoResponseJson()
80 static uint8_t *GenerateSecInfoRequestJson(uint64_t challenge) in GenerateSecInfoRequestJson() argument
94 …DslmByteToHexString((uint8_t *)&challenge, sizeof(challenge), (uint8_t *)nonce, CHALLENGE_STRING_L… in GenerateSecInfoRequestJson()
120 int32_t BuildDeviceSecInfoRequest(uint64_t challenge, MessageBuff **msg) in BuildDeviceSecInfoRequest() argument
132 out->buff = GenerateSecInfoRequestJson(challenge); in BuildDeviceSecInfoRequest()
160 …slmHexStringToByte(nonceStr, strlen(nonceStr), (uint8_t *)&obj->challenge, sizeof(obj->challenge)); in ParseDeviceSecInfoRequest()
174 int32_t BuildDeviceSecInfoResponse(uint64_t challenge, const DslmCredBuff *cred, MessageBuff **msg) in BuildDeviceSecInfoResponse() argument
184 out->buff = GenerateSecInfoResponseJson(challenge, cred); in BuildDeviceSecInfoResponse()
195 int32_t ParseDeviceSecInfoResponse(const MessageBuff *msg, uint64_t *challenge, uint32_t *version, … in ParseDeviceSecInfoResponse() argument
[all …]
Ddslm_msg_utils.h34 int32_t BuildDeviceSecInfoRequest(uint64_t challenge, MessageBuff **msg);
36 int32_t BuildDeviceSecInfoResponse(uint64_t challenge, const DslmCredBuff *cred, MessageBuff **msg);
40 int32_t ParseDeviceSecInfoResponse(const MessageBuff *msg, uint64_t *challenge, uint32_t *version, …
/base/security/asset/test/unittest/inner_api_rust/src/
Dpre_query.rs88 let challenge = asset_sdk::Manager::build().unwrap().pre_query(&query).unwrap(); in pre_query_batch_data() localVariable
89 assert_eq!(CHALLENGE_SIZE, challenge.len()); in pre_query_batch_data()
91 query.insert_attr(Tag::AuthChallenge, challenge); in pre_query_batch_data()
107 let challenge = asset_sdk::Manager::build().unwrap().pre_query(&query).unwrap(); in pre_query_single_data() localVariable
108 assert_eq!(CHALLENGE_SIZE, challenge.len()); in pre_query_single_data()
111 query.insert_attr(Tag::AuthChallenge, challenge); in pre_query_single_data()
125 let challenge = asset_sdk::Manager::build().unwrap().pre_query(&query).unwrap(); in pre_query_max_times() localVariable
126 assert_eq!(CHALLENGE_SIZE, challenge.len()); in pre_query_max_times()
127 challenges.push(challenge); in pre_query_max_times()
131 for challenge in challenges.into_iter() { in pre_query_max_times()
[all …]
Dpost_query.rs32 let challenge = asset_sdk::Manager::build().unwrap().pre_query(&query).unwrap(); in post_query_with_wrong_auth_challenge() localVariable
37 query.insert_attr(Tag::AuthChallenge, challenge); in post_query_with_wrong_auth_challenge()
48 let challenge = asset_sdk::Manager::build().unwrap().pre_query(&query).unwrap(); in post_query_normal() localVariable
50 query.insert_attr(Tag::AuthChallenge, challenge); in post_query_normal()
/base/security/asset/services/crypto_manager/src/
Dcrypto_manager.rs58 pub fn find(&mut self, calling_info: &CallingInfo, challenge: &Vec<u8>) -> Result<&Crypto> { in find()
61 if crypto.challenge().eq(challenge) && crypto.key().calling_info().eq(calling_info) { in find()
69 pub fn remove(&mut self, calling_info: &CallingInfo, challenge: &Vec<u8>) { in remove()
70 ….retain(|crypto| crypto.key().calling_info() != calling_info || !crypto.challenge().eq(challenge)); in remove()
Dcrypto.rs28 …fn InitKey(keyId: *const KeyId, valid_time: u32, challenge: *mut OutBlob, handle: *mut OutBlob) ->… in InitKey()
47 challenge: Vec<u8>, field
58 challenge: vec![0; CHALLENGE_LEN], in build()
68 …let mut challenge = OutBlob { size: self.challenge.len() as u32, data: self.challenge.as_mut_ptr()… in init_key() localVariable
76 &mut challenge as *mut OutBlob, in init_key()
81 SUCCESS => Ok(&self.challenge), in init_key()
168 pub(crate) fn challenge(&self) -> &Vec<u8> { in challenge() method
169 &self.challenge in challenge()
/base/security/device_security_level/oem_property/ohos/common/
Ddslm_ohos_verify.c41 uint64_t challenge; member
82 …ToByte(challengeStr, strlen(challengeStr), (uint8_t *)&nonce->challenge, sizeof(nonce->challenge)); in ParseNonceOfCertChain()
154 static int32_t CheckNonceOfCertChain(const struct NonceOfCertChain *nonce, uint64_t challenge, cons… in CheckNonceOfCertChain() argument
156 if (challenge != nonce->challenge) { in CheckNonceOfCertChain()
169 …erifyNonceOfCertChain(const char *jsonStr, const struct DeviceIdentify *device, uint64_t challenge) in VerifyNonceOfCertChain() argument
194 ret = CheckNonceOfCertChain(&nonce, challenge, pkInfoListStr); in VerifyNonceOfCertChain()
231 static int32_t VerifyStandardDslmCred(const DeviceIdentify *device, uint64_t challenge, const DslmC… in VerifyStandardDslmCred() argument
250 ret = VerifyNonceOfCertChain(resultInfo.nonceStr, device, challenge); in VerifyStandardDslmCred()
276 int32_t VerifyOhosDslmCred(const DeviceIdentify *device, uint64_t challenge, const DslmCredBuff *cr… in VerifyOhosDslmCred() argument
287 return VerifyStandardDslmCred(device, challenge, credBuff, credInfo); in VerifyOhosDslmCred()
/base/security/code_signature/utils/src/
Dhuks_attest_verifier.cpp168 static bool CompareTargetValue(int nid, uint8_t *data, int size, const ByteBuffer &challenge) in CompareTargetValue() argument
176 return (static_cast<uint32_t>(size) == challenge.GetSize()) in CompareTargetValue()
177 || (memcmp(data, challenge.GetBuffer(), size) == 0); in CompareTargetValue()
182 static bool ParseASN1Sequence(uint8_t *data, int size, const ByteBuffer &challenge) in ParseASN1Sequence() argument
197 challenge); in ParseASN1Sequence()
203 ret = CompareTargetValue(curNid, value->data, value->length, challenge); in ParseASN1Sequence()
212 static bool VerifyExtension(X509 *cert, const ByteBuffer &challenge) in VerifyExtension() argument
233 ParseASN1Sequence(extData->data, extData->length, challenge); in VerifyExtension()
261 static bool VerifyCertAndExtension(X509 *signCert, X509 *issuerCert, const ByteBuffer &challenge) in VerifyCertAndExtension() argument
268 if (!VerifyExtension(signCert, challenge)) { in VerifyCertAndExtension()
[all …]
/base/security/device_auth/frameworks/deviceauth_lite/source/auth_info/
Dexchange_auth_info_client.c244 typedef void (*COPY_CHALLENGE)(struct uint8_buff *sign_src_data, const struct challenge *peer_chall…
245 const struct challenge *self_challenge);
248 static void copy_peer_self_challenge(struct uint8_buff *sign_src_data, const struct challenge *peer…
249 const struct challenge *self_challenge);
271 static void copy_self_peer_challenge(struct uint8_buff *sign_src_data, const struct challenge *peer…
272 const struct challenge *self_challenge);
339 static void copy_peer_self_challenge(struct uint8_buff *sign_src_data, const struct challenge *peer… in copy_peer_self_challenge()
340 const struct challenge *self_challenge) in copy_peer_self_challenge()
342 …if (memcpy_s(sign_src_data->val, sign_src_data->size, peer_challenge->challenge, CHALLENGE_BUFF_LE… in copy_peer_self_challenge()
349 self_challenge->challenge, CHALLENGE_BUFF_LENGTH) != EOK) { in copy_peer_self_challenge()
[all …]
/base/security/code_signature/interfaces/innerkits/local_code_sign/src/
Dlocal_code_sign_proxy.cpp26 int32_t LocalCodeSignProxy::InitLocalCertificate(const ByteBuffer &challenge, ByteBuffer &cert) in InitLocalCertificate() argument
38 if (!data.WriteUint32(challenge.GetSize())) { in InitLocalCertificate()
41 if (!data.WriteBuffer(challenge.GetBuffer(), challenge.GetSize())) { in InitLocalCertificate()
/base/useriam/user_auth_framework/test/fuzztest/services/userauthservice_fuzzer/
Duser_auth_service_fuzzer.cpp203 std::vector<uint8_t> challenge; in FuzzAuth() local
204 FillFuzzUint8Vector(parcel, challenge); in FuzzAuth()
211 g_userAuthService.Auth(apiVersion, challenge, authType, authTrustLevel, callback); in FuzzAuth()
218 std::vector<uint8_t> challenge; in FuzzAuthUser() local
219 FillFuzzUint8Vector(parcel, challenge); in FuzzAuthUser()
226 .challenge = challenge, in FuzzAuthUser()
238 std::vector<uint8_t> challenge; in FuzzIdentify() local
239 FillFuzzUint8Vector(parcel, challenge); in FuzzIdentify()
245 g_userAuthService.Identify(challenge, authType, callback); in FuzzIdentify()
271 FillFuzzUint8Vector(parcel, authParam.challenge); in FuzzAuthWidget()
/base/useriam/pin_auth/test/unittest/src/
Dinputer_get_data_service_test.cpp60 … int32_t authSubType, std::vector<uint8_t> challenge, std::shared_ptr<IInputerData> inputerData) { in __anon8cd1e2200102() argument
62 EXPECT_EQ(challenge.empty(), true); in __anon8cd1e2200102()
74 .challenge = {},
/base/security/device_auth/frameworks/deviceauth_lite/source/struct/
Dpake_client_confirm.c44 uint8_t *tmp_cha_data_hex = raw_byte_to_hex_string(pake_client_confirm->challenge.challenge, in make_pake_client_confirm()
45 pake_client_confirm->challenge.length); in make_pake_client_confirm()
Dpake_response.c41 int32_t result = byte_convert(obj, FIELD_CHALLENGE, pake_response->challenge.challenge, in parse_pake_response()
42 &pake_response->challenge.length, CHALLENGE_BUFF_LENGTH); in parse_pake_response()
Dauth_start_response.c49 result = byte_convert(obj, FIELD_CHALLENGE, auth_start_response->challenge.challenge, in parse_auth_start_response()
50 &auth_start_response->challenge.length, CHALLENGE_BUFF_LENGTH); in parse_auth_start_response()
/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/iso_task/lite_exchange_task/
Diso_server_bind_exchange_task.c76 static int DecryptChallenge(const IsoParams *params, const CJson *in, uint8_t *challenge, uint32_t … in DecryptChallenge() argument
101 Uint8Buff challengeBuf = { challenge, CHALLENGE_SIZE }; in DecryptChallenge()
170 static int GenerateAuthCodeAndImport(const IsoParams *params, CJson *out, uint8_t *challenge, uint3… in GenerateAuthCodeAndImport() argument
190 Uint8Buff challengeBuf = { challenge, challengeLen }; in GenerateAuthCodeAndImport()
225 uint8_t *challenge = (uint8_t *)HcMalloc(CHALLENGE_SIZE, 0); in ServerBindExchangeStart() local
226 if (challenge == NULL) { in ServerBindExchangeStart()
230 res = DecryptChallenge(params, in, challenge, CHALLENGE_SIZE); in ServerBindExchangeStart()
235 res = GenerateAuthCodeAndImport(params, out, challenge, CHALLENGE_SIZE); in ServerBindExchangeStart()
243 HcFree(challenge); in ServerBindExchangeStart()
/base/useriam/pin_auth/services/modules/executors/src/
Dpin_auth_executor_callback_hdi.cpp110 uint32_t algoVersion, const std::vector<uint8_t>& challenge) in OnGetData() argument
112 static_cast<void>(challenge); in OnGetData()
133 .challenge = challenge, in OnGetData()
150 .challenge = challenge, in OnGetData()
/base/account/os_account/test/fuzztest/iamaccount/opensession_fuzzer/
Dopensession_fuzzer.cpp30 std::vector<uint8_t> challenge; in OpenSessionFuzzTest() local
31 int32_t result = AccountIAMClient::GetInstance().OpenSession(userId, challenge); in OpenSessionFuzzTest()
/base/account/os_account/services/accountmgr/test/unittest/account_iam/
Daccount_iam_service_test.cpp130 std::vector<uint8_t> challenge; variable
131 int32_t res = accountIAMService_->OpenSession(0, challenge);
143 std::vector<uint8_t> challenge; variable
144 int32_t res = accountIAMService_->OpenSession(TEST_NOT_EXIST_ID, challenge);
383 std::vector<uint8_t> challenge; variable
388 .challenge = challenge,
405 std::vector<uint8_t> challenge; variable
410 .challenge = challenge,
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/
Dhks_access_control_part1_test.cpp69 const char *challenge = "AuthToken_Sign_Verify_KeyAliass"; variable
70 struct HksBlob challengeBlob = { TOKEN_CHALLENGE_LEN, (uint8_t *)challenge };

123456789