Home
last modified time | relevance | path

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

12

/test/xts/device_attest_lite/test/tdd/gtest/
Dattest_tdd_test.cpp153 ChallengeResult challenge; in TddGenActiveMsg() local
154 challenge.challenge = attestChallengeActive; in TddGenActiveMsg()
155 challenge.currentTime = ATTEST_ACTIVE_CHAP_TIME; in TddGenActiveMsg()
156 int32_t ret = GenActiveMsg(authResult, &challenge, &reqMsg); in TddGenActiveMsg()
178 ChallengeResult challenge; in TddGenAuthMsg() local
179 challenge.challenge = attestChallengeAuth; in TddGenAuthMsg()
180 challenge.currentTime = ATTEST_AUTH_CHAP_TIME; in TddGenAuthMsg()
181 int32_t ret = GenAuthMsg(&challenge, &reqMsg); in TddGenAuthMsg()
201 ChallengeResult challenge; in TddGenResetMsg() local
202 challenge.challenge = attestChallengeReset; in TddGenResetMsg()
[all …]
/test/xts/acts/useriam/face_auth/js_api_test/function_test/userauthpart2/src/main/js/test/
DSecurity_IAM_PIN_Kit_CallbackJsunit.test.js170 let challenge = new Uint8Array([253, 19, 58, 160, 67, 200, 247, 37])
203 await authPromise(challenge, 0, 10000,5)
204 await authPromise(challenge, 1, 10000,5)
205 await authPromise(challenge, 3, 20000,5)
206 await authPromise(challenge, 5, 20000,5)
207 await authPromise(challenge, 2, 5000,6)
208 await authPromise(challenge, 4, 15000,6)
209 await authPromise(challenge, 2, 10000,10)
210 await authPromise(challenge, 2, 20000,10)
211 await authPromise(challenge, 2, 30000,10)
[all …]
DSecurity_IAM_FUNC_Jsunit.test.js134 let challenge = new Uint8Array([253, 19, 58, 160, 67, 200, 247, 37])
143 … authInstance = userAuthNorth.getAuthInstance(challenge, authType[idx1], level[idx2]);
170 let challenge = new Uint8Array([253, 19, 58, 160, 67, 200, 247, 37])
184 var authInstance = userAuthNorth.getAuthInstance(challenge, authTrustLevel);
192 var authInstance = userAuthNorth.getAuthInstance(challenge, authType);
208 var authInstance = userAuthNorth.getAuthInstance(challenge, 2, 10000, 10000);
220 …var authInstance = userAuthNorth.getAuthInstance(challenge, invalidauthType[idx], userAuthNorth.Au…
232 … var authInstance = userAuthNorth.getAuthInstance(challenge, 2, invalidtrustLevel[idx]);
250 let challenge = new Uint8Array([253, 19, 58, 160, 67, 200, 247, 37])
256 … var authInstance = userAuthNorth.getAuthInstance(challenge, authType, authTrustLevel);
[all …]
DExecute.test.js20 challenge: new Uint8Array([49, 49, 49, 49, 49, 49]), property
174 challenge: new Uint8Array([49, 49, 49, 49, 49, 49]), property
179 challenge: new Uint8Array([49, 49, 49, 49, 49, 49]), property
194 challenge: null, property
201 challenge: new Uint8Array(['aaa']), property
DSignNormalNotAccessBiometricExecute.test.js20 challenge: new Uint8Array([49, 49, 49, 49, 49, 49]), property
/test/xts/device_attest_lite/services/core/attest/
Dattest_service_challenge.c36 challengeResult->challenge = NULL; in CreateChallengeResult()
87 static int32_t ParseChallengeResult(const char* jsonStr, ChallengeResult* challenge) in ParseChallengeResult() argument
89 if (jsonStr == NULL || challenge == NULL) { in ParseChallengeResult()
103 challenge->currentTime = (uint64_t)GetObjectItemValueNumber(jsonStr, "currentTime"); in ParseChallengeResult()
104 if (isnan((double)challenge->currentTime)) { in ParseChallengeResult()
108 int32_t ret = GetObjectItemValueStr(jsonStr, "challenge", &(challenge->challenge)); in ParseChallengeResult()
120 … ret = GetObjectItemValueStr(serverInfo, "activeSite", &(challenge->cloudServerInfo.activeSite)); in ParseChallengeResult()
125 … ret = GetObjectItemValueStr(serverInfo, "standbySite", &(challenge->cloudServerInfo.standbySite)); in ParseChallengeResult()
143 ATTEST_MEM_FREE((*challengeResult)->challenge); in DestroyChallengeResult()
Dattest_service.c90 ChallengeResult* challenge = NULL; in ResetDevice() local
95 ret = GetChallenge(&challenge, ATTEST_ACTION_RESET); in ResetDevice()
101 ret = GenResetMsg(challenge, &reqMsg); in ResetDevice()
119 FREE_CHALLENGE_RESULT(challenge); in ResetDevice()
135 ChallengeResult* challenge = NULL; in AuthDevice() local
140 ret = GetChallenge(&challenge, ATTEST_ACTION_AUTHORIZE); in AuthDevice()
146 ret = GenAuthMsg(challenge, &reqMsg); in AuthDevice()
164 FREE_CHALLENGE_RESULT(challenge); in AuthDevice()
185 ChallengeResult* challenge = NULL; in ActiveToken() local
190 ret = GetChallenge(&challenge, ATTEST_ACTION_ACTIVATE); in ActiveToken()
[all …]
Dattest_service_reset.c39 …if (GetTokenValueHmac(challengeResult->challenge, tokenValueHmac, TOKEN_VALUE_HMAC_LEN) != ATTEST_… in GenResetMsg()
/test/xts/device_attest/services/core/attest/
Dattest_service_challenge.c36 challengeResult->challenge = NULL; in CreateChallengeResult()
87 static int32_t ParseChallengeResult(const char* jsonStr, ChallengeResult *challenge) in ParseChallengeResult() argument
89 if (jsonStr == NULL || challenge == NULL) { in ParseChallengeResult()
103 challenge->currentTime = GetObjectItemValueNumber(jsonStr, "currentTime"); in ParseChallengeResult()
104 if (isnan((double)challenge->currentTime)) { in ParseChallengeResult()
108 int32_t ret = GetObjectItemValueStr(jsonStr, "challenge", &(challenge->challenge)); in ParseChallengeResult()
120 … ret = GetObjectItemValueStr(serverInfo, "activeSite", &(challenge->cloudServerInfo.activeSite)); in ParseChallengeResult()
125 … ret = GetObjectItemValueStr(serverInfo, "standbySite", &(challenge->cloudServerInfo.standbySite)); in ParseChallengeResult()
143 ATTEST_MEM_FREE((*challengeResult)->challenge); in DestroyChallengeResult()
Dattest_service.c62 ChallengeResult* challenge = NULL; in ResetDevice() local
67 ret = GetChallenge(&challenge, ATTEST_ACTION_RESET); in ResetDevice()
73 ret = GenResetMsg(challenge, &reqMsg); in ResetDevice()
91 FREE_CHALLENGE_RESULT(challenge); in ResetDevice()
107 ChallengeResult* challenge = NULL; in AuthDevice() local
112 ret = GetChallenge(&challenge, ATTEST_ACTION_AUTHORIZE); in AuthDevice()
118 ret = GenAuthMsg(challenge, &reqMsg); in AuthDevice()
136 FREE_CHALLENGE_RESULT(challenge); in AuthDevice()
157 ChallengeResult* challenge = NULL; in ActiveToken() local
162 ret = GetChallenge(&challenge, ATTEST_ACTION_ACTIVATE); in ActiveToken()
[all …]
Dattest_service_reset.c39 …if (GetTokenValueHmac(challengeResult->challenge, tokenValueHmac, TOKEN_VALUE_HMAC_LEN) != ATTEST_… in GenResetMsg()
Dattest_service_active.c51 …if (GetTokenValueHmac((const char*)(challengeResult->challenge), tokenValueHmac, TOKEN_VALUE_HMAC_… in GenActiveMsg()
/test/xts/hats/useriam/userauth_additional/src/
Duser_auth_hdi.cpp215 std::vector<uint8_t> challenge; variable
217 FillTestUint8Vector(parcel, challenge);
218 EXPECT_EQ(g_service.OpenSession(userId[i], challenge), 0);
283 std::vector<uint8_t> challenge; variable
293 EXPECT_EQ(g_service.OpenSession(userId, challenge), 0);
335 std::vector<uint8_t> challenge; variable
345 EXPECT_EQ(g_service.OpenSession(userId[i], challenge), 0);
371 std::vector<uint8_t> challenge; variable
372 EXPECT_EQ(g_service.OpenSession(userId, challenge), 0);
464 std::vector<uint8_t> challenge; variable
[all …]
/test/xts/acts/security/asset/asset_js/src/main/ets/test/
DAssetAuthQuery.test.ets58 let challenge = await aw.assetPreQuery(attr2);
59 expect(challenge.toString().length).assertLarger(10);
60 challenges.push(challenge as Uint8Array);
106 let challenge = await aw.assetPreQuery(attr2) as Uint8Array;
107 challenge[1] = challenge[11];
108 challenge[2] = challenge[12];
109 challenge[3] = challenge[13];
110 let authToken = challenge;
118 expect(await aw.assetPostQuery(challenge))
137 let challenge = await aw.assetPreQuery(attr2);
[all …]
/test/xts/device_attest/services/devattest_ability/test/tdd/gtest/src/
Dattest_tdd_test.cpp225 ChallengeResult challenge; in TddGenMsg() local
228 challenge.challenge = (char*)ATTEST_RESET_CHAP; in TddGenMsg()
229 challenge.currentTime = ATTEST_RESET_CHAP_TIME; in TddGenMsg()
230 ret = GenResetMsg(&challenge, &reqMsg); in TddGenMsg()
234 challenge.challenge = (char*)ATTEST_AUTH_CHAP; in TddGenMsg()
235 challenge.currentTime = ATTEST_AUTH_CHAP_TIME; in TddGenMsg()
236 ret = GenAuthMsg(&challenge, &reqMsg); in TddGenMsg()
240 challenge.challenge = (char*)ATTEST_ACTIVE_CHAP; in TddGenMsg()
241 challenge.currentTime = ATTEST_ACTIVE_CHAP_TIME; in TddGenMsg()
243 ret = GenActiveMsg(authResult, &challenge, &reqMsg); in TddGenMsg()
/test/xts/acts/useriam/face_auth/js_api_test/function_test/userauthnopermission/src/main/js/test/
Dnopermisson.js137 let challenge = new Uint8Array([253, 19, 58, 160, 67, 200, 247, 37])
150 … contextID1 = UserAuthKit.auth(challenge, authType[idx0], userAuth.AuthTrustLevel.ATL1, {
206 let challenge = new Uint8Array([253, 19, 58, 160, 67, 200, 247, 37])
211 … var authInstance = userAuth.getAuthInstance(challenge, authType[idx0], authTrustLevel);
230 let challenge = new Uint8Array([253, 19, 58, 160, 67, 200, 247, 37])
236 … var authInstance = userAuth.getAuthInstance(challenge, authType[idx0], authTrustLevel);
/test/xts/acts/security/asset/asset_ndk/src/main/cpp/
Dhello.cpp118 Asset_Blob challenge = {(uint32_t)32, (uint8_t *)challengeBuffer}; in Asset_PreAndPostQueryNormal() local
124 int32_t ret = OH_Asset_PreQuery(attr, sizeof(attr) / sizeof(attr[0]), &challenge); in Asset_PreAndPostQueryNormal()
129 napi_create_string_utf8(env, (char *)challenge.data, challenge.size, &tmp); in Asset_PreAndPostQueryNormal()
132 {.tag = ASSET_TAG_AUTH_CHALLENGE, .value.blob = challenge}, in Asset_PreAndPostQueryNormal()
146 OH_Asset_FreeBlob(&challenge); in Asset_PreAndPostQueryNormal()
174 Asset_Blob challenge = {(uint32_t)32, (uint8_t *)challengeBuffer}; in Asset_PreAndPostQueryError() local
179 int32_t ret = OH_Asset_PreQuery(attr, sizeof(attr) / sizeof(attr[0]), &challenge); in Asset_PreAndPostQueryError()
193 ret = OH_Asset_PreQuery(attr2, sizeof(attr2) / sizeof(attr2[0]), &challenge); in Asset_PreAndPostQueryError()
226 Asset_Blob challenge = {(uint32_t)32, (uint8_t *)challengeBuffer}; in Asset_PreQuery() local
231 int32_t ret = OH_Asset_PreQuery(attr, sizeof(attr) / sizeof(attr[0]), &challenge); in Asset_PreQuery()
[all …]
/test/xts/device_attest_lite/services/core/security/
Dattest_security_token.c29 static int32_t EncryptHmac(const char *challenge, const uint8_t *tokenValue, size_t tokenValueLen, in EncryptHmac() argument
32 …if (challenge == NULL || tokenValue == NULL || tokenValueLen == 0 || hmac == NULL || hmacLen == 0)… in EncryptHmac()
41 (mbedtls_md_hmac_starts(&ctx, (const uint8_t*)challenge, strlen(challenge)) < 0) || in EncryptHmac()
95 static int32_t EncryptHmacIterative(const char *challenge, const uint8_t *tokenValue, size_t tokenV… in EncryptHmacIterative() argument
116 int32_t ret = EncryptHmac(challenge, (const uint8_t*)content, strlen(content), hmac, hmacLen); in EncryptHmacIterative()
465 int32_t GetTokenValueHmac(const char* challenge, uint8_t* tokenValueHmac, uint8_t tokenValueHmacLen) in GetTokenValueHmac() argument
468 if ((challenge == NULL) || (tokenValueHmac == NULL)) { in GetTokenValueHmac()
481 …ret = EncryptHmac(challenge, (const uint8_t*)tokenValue, strlen((const char *)tokenValue), hmac, s… in GetTokenValueHmac()
/test/xts/hats/useriam/userauth/src/
Duser_auth_hdi.cpp131 FillTestUint8Vector(parcel, authSolution.challenge); in FillAuthSolution()
308 std::vector<uint8_t> challenge; variable
309 FillTestUint8Vector(parcel, challenge);
313 …int32_t ret = g_service.BeginIdentification(contextId, authType, challenge, executorId, scheduleIn…
345 std::vector<uint8_t> challenge; variable
346 FillTestUint8Vector(parcel, challenge);
347 int32_t ret = g_service.OpenSession(userId, challenge);
652 std::vector<uint8_t> challenge; variable
653 FillTestUint8Vector(parcel, challenge);
657 …int32_t ret = g_service.BeginIdentificationV1_1(contextId, authType, challenge, executorId, schedu…
/test/xts/device_attest/services/core/security/
Dattest_security_token.c29 static int32_t EncryptHmac(const char *challenge, const uint8_t *tokenValue, size_t tokenValueLen, in EncryptHmac() argument
32 …if (challenge == NULL || tokenValue == NULL || tokenValueLen == 0 || hmac == NULL || hmacLen == 0)… in EncryptHmac()
41 (mbedtls_md_hmac_starts(&ctx, (const uint8_t*)challenge, strlen(challenge)) < 0) || in EncryptHmac()
95 static int32_t EncryptHmacIterative(const char *challenge, const uint8_t *tokenValue, size_t tokenV… in EncryptHmacIterative() argument
116 int32_t ret = EncryptHmac(challenge, (const uint8_t*)content, strlen(content), hmac, hmacLen); in EncryptHmacIterative()
490 int32_t GetTokenValueHmac(const char* challenge, uint8_t* tokenValueHmac, uint8_t tokenValueHmacLen) in GetTokenValueHmac() argument
493 if ((challenge == NULL) || (tokenValueHmac == NULL)) { in GetTokenValueHmac()
506 …ret = EncryptHmac(challenge, (const uint8_t*)tokenValue, strlen((const char *)tokenValue), hmac, s… in GetTokenValueHmac()
/test/xts/device_attest/services/core/include/security/
Dattest_security_token.h35 int32_t GetTokenValueHmac(const char* challenge, uint8_t* tokenValueHmac, uint8_t tokenValueHmacLen…
/test/xts/device_attest_lite/services/core/include/security/
Dattest_security_token.h35 int32_t GetTokenValueHmac(const char* challenge, uint8_t* tokenValueHmac, uint8_t tokenValueHmacLen…
/test/xts/acts/security/asset/asset_js/src/main/ets/test/aw/
DAssetAw.ets278 let challenge: Uint8Array = await asset.preQuery(attr);
279 return challenge;
297 let challenge: Uint8Array = await asset.preQuery(attr);
298 return challenge;
304 export async function assetPostQuery(challenge: Uint8Array) {
307 attr.set(asset.Tag.AUTH_CHALLENGE, challenge)
/test/xts/device_attest_lite/services/core/include/
Dattest_type.h106 char *challenge; member
/test/xts/device_attest/services/core/include/
Dattest_type.h119 char *challenge; member

12