Home
last modified time | relevance | path

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

/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.cpp194 deserialized_password = &deserialized_msg.auth_token; in TEST()
196 ASSERT_EQ(0, memcmp(msg.auth_token.Data<uint8_t>(), deserialized_password->Data<uint8_t>(), in TEST()
/system/security/keystore/
Dkeymaster_enforcement.h101 const HardwareAuthToken& auth_token, uint64_t op_handle,
112 NullOr<const HardwareAuthToken&> auth_token);
119 ErrorCode AuthorizeUpdate(const AuthorizationSet& auth_set, const HardwareAuthToken& auth_token, in AuthorizeUpdate() argument
121 return AuthorizeUpdateOrFinish(auth_set, auth_token, op_handle); in AuthorizeUpdate()
129 ErrorCode AuthorizeFinish(const AuthorizationSet& auth_set, const HardwareAuthToken& auth_token, in AuthorizeFinish() argument
131 return AuthorizeUpdateOrFinish(auth_set, auth_token, op_handle); in AuthorizeFinish()
198 const HardwareAuthToken& auth_token, uint64_t op_handle);
202 bool AuthTokenMatches(const AuthorizationSet& auth_set, const HardwareAuthToken& auth_token,
Dkeymaster_enforcement.cpp75 const HardwareAuthToken& auth_token, in AuthorizeOperation() argument
94 return AuthorizeBegin(purpose, keyid, auth_set, operation_params, auth_token); in AuthorizeOperation()
96 return AuthorizeUpdateOrFinish(auth_set, auth_token, op_handle); in AuthorizeOperation()
102 const HardwareAuthToken& auth_token, in AuthorizeUpdateOrFinish() argument
135 if (auth_token.mac.size() && in AuthorizeUpdateOrFinish()
136 AuthTokenMatches(auth_set, auth_token, user_secure_id.value(), auth_type_index, in AuthorizeUpdateOrFinish()
150 NullOr<const HardwareAuthToken&> auth_token) { in AuthorizeBegin() argument
234 if (secure_id.isOk() && auth_token.isOk() && in AuthorizeBegin()
235 AuthTokenMatches(auth_set, auth_token.value(), secure_id.value(), in AuthorizeBegin()
432 const HardwareAuthToken& auth_token, in AuthTokenMatches() argument
[all …]
Dauth_token_table.h62 void AddAuthenticationToken(HardwareAuthToken&& auth_token);
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()
/system/keymaster/android_keymaster/
Dkeymaster_enforcement.cpp297 const hw_auth_token_t* auth_token; in AuthorizeBegin() local
299 if (!GetAndValidateAuthToken(operation_params, &auth_token, &token_auth_type)) { in AuthorizeBegin()
303 uint64_t token_timestamp_millis = ntoh(auth_token->timestamp); in AuthorizeBegin()
453 const hw_auth_token_t** auth_token, in GetAndValidateAuthToken() argument
461 if (auth_token_blob.data_length != sizeof(**auth_token)) { in GetAndValidateAuthToken()
467 *auth_token = reinterpret_cast<const hw_auth_token_t*>(auth_token_blob.data); in GetAndValidateAuthToken()
468 if ((*auth_token)->version != HW_AUTH_TOKEN_VERSION) { in GetAndValidateAuthToken()
470 (*auth_token)->version, HW_AUTH_TOKEN_VERSION); in GetAndValidateAuthToken()
474 if (!ValidateTokenSignature(**auth_token)) { in GetAndValidateAuthToken()
479 *token_auth_type = ntoh((*auth_token)->authenticator_type); in GetAndValidateAuthToken()
[all …]
/system/gatekeeper/
Dgatekeeper_messages.cpp183 VerifyResponse::VerifyResponse(uint32_t user_id, SizedBuffer auth_token) { in VerifyResponse() argument
185 this->auth_token = move(auth_token); in VerifyResponse()
193 void VerifyResponse::SetVerificationToken(SizedBuffer auth_token) { in SetVerificationToken() argument
194 this->auth_token = move(auth_token); in SetVerificationToken()
198 return serialized_buffer_size(auth_token) + sizeof(request_reenroll); in nonErrorSerializedSize()
202 append_to_buffer(&buffer, auth_token); in nonErrorSerialize()
208 auth_token = {}; in nonErrorDeserialize()
210 gatekeeper_error_t err = read_from_buffer(&payload, end, &auth_token); in nonErrorDeserialize()
Dgatekeeper.cpp148 SizedBuffer auth_token; in Verify() local
149 response->error = MintAuthToken(&auth_token, timestamp, in Verify()
154 response->SetVerificationToken(move(auth_token)); in Verify()
226 gatekeeper_error_t GateKeeper::MintAuthToken(SizedBuffer *auth_token, in MintAuthToken() argument
229 if (auth_token == nullptr) return ERROR_INVALID; in MintAuthToken()
264 *auth_token = { token_buffer, sizeof(hw_auth_token_t) }; in MintAuthToken()
/system/core/trusty/gatekeeper/
Dtrusty_gatekeeper.cpp125 hidl_vec<uint8_t> auth_token( in verify() local
126 response.auth_token.Data<uint8_t>(), in verify()
127 response.auth_token.Data<uint8_t>() + response.auth_token.size()); in verify()
131 response.retry_timeout, auth_token}); in verify()
/system/core/trusty/keymaster/4.0/
DTrustyKeymaster4Device.cpp109 hw_auth_token_t* auth_token = reinterpret_cast<hw_auth_token_t*>(p.blob.data()); in injectAuthToken() local
110 auth_token->version = 0; in injectAuthToken()
111 auth_token->challenge = authToken.challenge; in injectAuthToken()
112 auth_token->user_id = authToken.userId; in injectAuthToken()
113 auth_token->authenticator_id = authToken.authenticatorId; in injectAuthToken()
114 auth_token->authenticator_type = in injectAuthToken()
116 auth_token->timestamp = htobe64(authToken.timestamp); in injectAuthToken()
117 static_assert(mac_len == sizeof(auth_token->hmac)); in injectAuthToken()
118 memcpy(auth_token->hmac, authToken.mac.data(), mac_len); in injectAuthToken()
315 request.auth_token.challenge = authToken.challenge; in verifyAuthorization()
[all …]
/system/gatekeeper/include/gatekeeper/
Dgatekeeper_messages.h184 VerifyResponse(uint32_t user_id, SizedBuffer auth_token);
187 void SetVerificationToken(SizedBuffer auth_token);
193 SizedBuffer auth_token; member
Dgatekeeper.h179 gatekeeper_error_t MintAuthToken(SizedBuffer *auth_token, uint64_t timestamp,
/system/keymaster/ng/
DAndroidKeymaster4Device.cpp286 request.auth_token.challenge = authToken.challenge; in verifyAuthorization()
287 request.auth_token.user_id = authToken.userId; in verifyAuthorization()
288 request.auth_token.authenticator_id = authToken.authenticatorId; in verifyAuthorization()
289 request.auth_token.authenticator_type = legacy_enum_conversion(authToken.authenticatorType); in verifyAuthorization()
290 request.auth_token.timestamp = authToken.timestamp; in verifyAuthorization()
292 request.auth_token.mac = mac; in verifyAuthorization()
/system/keymaster/include/keymaster/
Dandroid_keymaster_messages.h872 auth_token.SerializedSize(); in SerializedSize()
878 return auth_token.Serialize(buf, end); in Serialize()
884 auth_token.Deserialize(buf_ptr, end)); in Deserialize()
889 HardwareAuthToken auth_token; member