Home
last modified time | relevance | path

Searched refs:auth_token (Results 1 – 20 of 20) sorted by relevance

/system/security/keystore/
Dkeymaster_enforcement.h55 const HardwareAuthToken& auth_token, uint64_t op_handle,
66 NullOr<const HardwareAuthToken&> auth_token);
73 ErrorCode AuthorizeUpdate(const AuthorizationSet& auth_set, const HardwareAuthToken& auth_token, in AuthorizeUpdate() argument
75 return AuthorizeUpdateOrFinish(auth_set, auth_token, op_handle); in AuthorizeUpdate()
83 ErrorCode AuthorizeFinish(const AuthorizationSet& auth_set, const HardwareAuthToken& auth_token, in AuthorizeFinish() argument
85 return AuthorizeUpdateOrFinish(auth_set, auth_token, op_handle); in AuthorizeFinish()
152 const HardwareAuthToken& auth_token, uint64_t op_handle);
156 bool AuthTokenMatches(const AuthorizationSet& auth_set, const HardwareAuthToken& auth_token,
Dkeymaster_enforcement.cpp120 const HardwareAuthToken& auth_token, in AuthorizeOperation() argument
139 return AuthorizeBegin(purpose, keyid, auth_set, operation_params, auth_token); in AuthorizeOperation()
141 return AuthorizeUpdateOrFinish(auth_set, auth_token, op_handle); in AuthorizeOperation()
147 const HardwareAuthToken& auth_token, in AuthorizeUpdateOrFinish() argument
180 if (auth_token.mac.size() && in AuthorizeUpdateOrFinish()
181 AuthTokenMatches(auth_set, auth_token, user_secure_id.value(), auth_type_index, in AuthorizeUpdateOrFinish()
195 NullOr<const HardwareAuthToken&> auth_token) { in AuthorizeBegin() argument
279 if (secure_id.isOk() && auth_token.isOk() && in AuthorizeBegin()
280 AuthTokenMatches(auth_set, auth_token.value(), secure_id.value(), in AuthorizeBegin()
490 const HardwareAuthToken& auth_token, in AuthTokenMatches() argument
[all …]
Dauth_token_table.cpp80 void AuthTokenTable::AddAuthenticationToken(HardwareAuthToken&& auth_token) { in AddAuthenticationToken() argument
81 Entry new_entry(std::move(auth_token), clock_function_()); in AddAuthenticationToken()
Dauth_token_table.h63 void AddAuthenticationToken(HardwareAuthToken&& auth_token);
/system/core/gatekeeperd/tests/
Dgatekeeper_test.cpp83 hw_auth_token_t *auth_token = in TEST() local
84 reinterpret_cast<hw_auth_token_t *>(response.auth_token.buffer.get()); in TEST()
86 ASSERT_EQ((uint32_t) HW_AUTH_PASSWORD, ntohl(auth_token->authenticator_type)); in TEST()
87 ASSERT_EQ((uint64_t) 1, auth_token->challenge); in TEST()
88 ASSERT_NE(~((uint32_t) 0), auth_token->timestamp); in TEST()
89 ASSERT_NE((uint64_t) 0, auth_token->user_id); in TEST()
90 ASSERT_NE((uint64_t) 0, auth_token->authenticator_id); in TEST()
118 hw_auth_token_t *auth_token = in TEST() local
119 reinterpret_cast<hw_auth_token_t *>(response.auth_token.buffer.get()); in TEST()
121 secure_id_t secure_id = auth_token->user_id; in TEST()
[all …]
/system/gatekeeper/tests/
Dgatekeeper_device_test.cpp59 uint8_t *auth_token; in TEST_F() local
71 password_payload, password_len, &auth_token, &auth_token_len, &should_reenroll); in TEST_F()
82 uint8_t *auth_token; in TEST_F() local
94 password_payload, password_len, &auth_token, &auth_token_len, &should_reenroll); in TEST_F()
98 hat = reinterpret_cast<hw_auth_token_t *>(auth_token); in TEST_F()
109 uint8_t *auth_token = NULL; in TEST_F() local
126 password_payload, password_len, &auth_token, &auth_token_len, in TEST_F()
129 ASSERT_EQ(NULL, auth_token); in TEST_F()
143 password_payload, password_len, &auth_token, &auth_token_len, in TEST_F()
154 uint8_t *auth_token = NULL; in TEST_F() local
[all …]
Dgatekeeper_messages_test.cpp196 SizedBuffer *auth_token = make_buffer(password_size); in TEST() local
199 VerifyResponse msg(USER_ID, auth_token); in TEST()
211 deserialized_password = &deserialized_msg.auth_token; in TEST()
213 ASSERT_EQ(0, memcmp(msg.auth_token.buffer.get(), deserialized_password->buffer.get(), in TEST()
/system/gatekeeper/
Dgatekeeper_messages.cpp192 VerifyResponse::VerifyResponse(uint32_t user_id, SizedBuffer *auth_token) { in VerifyResponse() argument
194 this->auth_token.buffer.reset(auth_token->buffer.release()); in VerifyResponse()
195 this->auth_token.length = auth_token->length; in VerifyResponse()
201 memset_s(&auth_token, 0, sizeof(auth_token)); in VerifyResponse()
205 if (auth_token.length > 0) { in ~VerifyResponse()
206 auth_token.buffer.reset(); in ~VerifyResponse()
210 void VerifyResponse::SetVerificationToken(SizedBuffer *auth_token) { in SetVerificationToken() argument
211 this->auth_token.buffer.reset(auth_token->buffer.release()); in SetVerificationToken()
212 this->auth_token.length = auth_token->length; in SetVerificationToken()
216 return serialized_buffer_size(auth_token) + sizeof(request_reenroll); in nonErrorSerializedSize()
[all …]
Dgatekeeper.cpp155 SizedBuffer auth_token(auth_token_len); in Verify() local
156 memcpy(auth_token.buffer.get(), auth_token_buffer.get(), auth_token_len); in Verify()
157 response->SetVerificationToken(&auth_token); in Verify()
223 void GateKeeper::MintAuthToken(UniquePtr<uint8_t> *auth_token, uint32_t *length, in MintAuthToken() argument
226 if (auth_token == NULL) return; in MintAuthToken()
249 auth_token->reset(reinterpret_cast<uint8_t *>(token)); in MintAuthToken()
/system/keymaster/android_keymaster/
Dkeymaster_enforcement.cpp438 hw_auth_token_t auth_token; in AuthTokenMatches() local
439 memcpy(&auth_token, auth_token_blob.data, sizeof(hw_auth_token_t)); in AuthTokenMatches()
440 if (auth_token.version != HW_AUTH_TOKEN_VERSION) { in AuthTokenMatches()
442 auth_token.version, HW_AUTH_TOKEN_VERSION); in AuthTokenMatches()
446 if (!ValidateTokenSignature(auth_token)) { in AuthTokenMatches()
451 if (auth_timeout_index == -1 && op_handle && op_handle != auth_token.challenge) { in AuthTokenMatches()
452 LOG_E("Auth token has the challenge %llu, need %llu", auth_token.challenge, op_handle); in AuthTokenMatches()
456 if (user_secure_id != auth_token.user_id && user_secure_id != auth_token.authenticator_id) { in AuthTokenMatches()
457 LOG_I("Auth token SIDs %llu and %llu do not match key SID %llu", auth_token.user_id, in AuthTokenMatches()
458 auth_token.authenticator_id, user_secure_id); in AuthTokenMatches()
[all …]
/system/core/gatekeeperd/
DSoftGateKeeperDevice.cpp74 uint32_t provided_password_length, uint8_t **auth_token, uint32_t *auth_token_length, in verify() argument
99 if (auth_token != NULL && auth_token_length != NULL) { in verify()
100 *auth_token = response.auth_token.buffer.release(); in verify()
101 *auth_token_length = response.auth_token.length; in verify()
Dgatekeeperd.cpp238 uint8_t *auth_token; in verify() local
242 &auth_token, &auth_token_length, request_reenroll); in verify()
248 uint8_t **auth_token, uint32_t *auth_token_length, bool *request_reenroll) { in verifyChallenge() argument
274 [&ret, request_reenroll, auth_token, auth_token_length] in verifyChallenge()
277 if (auth_token != nullptr && auth_token_length != nullptr && in verifyChallenge()
279 *auth_token = new uint8_t[rsp.data.size()]; in verifyChallenge()
281 memcpy(*auth_token, rsp.data.data(), *auth_token_length); in verifyChallenge()
300 provided_password, provided_password_length, auth_token, auth_token_length, in verifyChallenge()
311 provided_password, provided_password_length, auth_token, auth_token_length, in verifyChallenge()
315 if (ret == 0 && *auth_token != NULL && *auth_token_length > 0) { in verifyChallenge()
[all …]
DSoftGateKeeperDevice.h69 uint8_t **auth_token, uint32_t *auth_token_length, bool *request_reenroll);
DIGateKeeperService.h89 uint8_t **auth_token, uint32_t *auth_token_length, bool *request_reenroll) = 0;
/system/core/trusty/gatekeeper/
Dtrusty_gatekeeper.cpp128 uint8_t **auth_token, uint32_t *auth_token_length, bool *request_reenroll) { in Verify() argument
150 if (auth_token != NULL && auth_token_length != NULL) { in Verify()
151 *auth_token = response.auth_token.buffer.release(); in Verify()
152 *auth_token_length = response.auth_token.length; in Verify()
220 uint32_t provided_password_length, uint8_t **auth_token, uint32_t *auth_token_length, in verify() argument
230 auth_token, auth_token_length, request_reenroll); in verify()
Dtrusty_gatekeeper.h63 uint32_t provided_password_length, uint8_t **auth_token, uint32_t *auth_token_length,
115 uint8_t **auth_token, uint32_t *auth_token_length, bool *request_reenroll);
/system/gatekeeper/include/gatekeeper/
Dgatekeeper_messages.h156 VerifyResponse(uint32_t user_id, SizedBuffer *auth_token);
160 void SetVerificationToken(SizedBuffer *auth_token);
166 SizedBuffer auth_token; member
Dgatekeeper.h179 void MintAuthToken(UniquePtr<uint8_t> *auth_token, uint32_t *length, uint64_t timestamp,
/system/keymaster/ng/
DAndroidKeymaster4Device.cpp273 request.auth_token.challenge = authToken.challenge; in verifyAuthorization()
274 request.auth_token.user_id = authToken.userId; in verifyAuthorization()
275 request.auth_token.authenticator_id = authToken.authenticatorId; in verifyAuthorization()
276 request.auth_token.authenticator_type = legacy_enum_conversion(authToken.authenticatorType); in verifyAuthorization()
277 request.auth_token.timestamp = authToken.timestamp; in verifyAuthorization()
279 request.auth_token.mac = mac; in verifyAuthorization()
/system/keymaster/include/keymaster/
Dandroid_keymaster_messages.h865 auth_token.SerializedSize(); in SerializedSize()
871 return auth_token.Serialize(buf, end); in Serialize()
877 auth_token.Deserialize(buf_ptr, end)); in Deserialize()
882 HardwareAuthToken auth_token; member