Lines Matching refs:auth_set
75 bool is_public_key_algorithm(const AuthProxy& auth_set) { in is_public_key_algorithm() argument
77 return auth_set.GetTagValue(TAG_ALGORITHM, &algorithm) && in is_public_key_algorithm()
82 const AuthProxy& auth_set) { in authorized_purpose() argument
89 if (auth_set.Contains(TAG_PURPOSE, purpose)) in authorized_purpose()
118 const AuthProxy& auth_set, in AuthorizeOperation() argument
122 if (is_public_key_algorithm(auth_set)) { in AuthorizeOperation()
138 return AuthorizeBegin(purpose, keyid, auth_set, operation_params); in AuthorizeOperation()
140 return AuthorizeUpdateOrFinish(auth_set, operation_params, op_handle); in AuthorizeOperation()
146 KeymasterEnforcement::AuthorizeUpdateOrFinish(const AuthProxy& auth_set, in AuthorizeUpdateOrFinish() argument
151 for (size_t pos = 0; pos < auth_set.size(); ++pos) { in AuthorizeUpdateOrFinish()
152 switch (auth_set[pos].tag) { in AuthorizeUpdateOrFinish()
183 for (auto& param : auth_set) { in AuthorizeUpdateOrFinish()
187 if (AuthTokenMatches(auth_set, operation_params, param.long_integer, auth_type_index, in AuthorizeUpdateOrFinish()
202 const AuthProxy& auth_set, in AuthorizeBegin() argument
208 for (size_t pos = 0; pos < auth_set.size(); ++pos) { in AuthorizeBegin()
209 switch (auth_set[pos].tag) { in AuthorizeBegin()
224 keymaster_error_t error = authorized_purpose(purpose, auth_set); in AuthorizeBegin()
236 for (auto& param : auth_set) { in AuthorizeBegin()
280 if (AuthTokenMatches(auth_set, operation_params, param.long_integer, in AuthorizeBegin()
426 bool KeymasterEnforcement::AuthTokenMatches(const AuthProxy& auth_set, in AuthTokenMatches() argument
432 assert(auth_type_index < static_cast<int>(auth_set.size())); in AuthTokenMatches()
433 assert(auth_timeout_index < static_cast<int>(auth_set.size())); in AuthTokenMatches()
471 if (auth_type_index < 0 || auth_type_index > static_cast<int>(auth_set.size())) { in AuthTokenMatches()
476 assert(auth_set[auth_type_index].tag == KM_TAG_USER_AUTH_TYPE); in AuthTokenMatches()
477 if (auth_set[auth_type_index].tag != KM_TAG_USER_AUTH_TYPE) in AuthTokenMatches()
480 uint32_t key_auth_type_mask = auth_set[auth_type_index].integer; in AuthTokenMatches()
489 assert(auth_set[auth_timeout_index].tag == KM_TAG_AUTH_TIMEOUT); in AuthTokenMatches()
490 if (auth_set[auth_timeout_index].tag != KM_TAG_AUTH_TIMEOUT) in AuthTokenMatches()
493 if (auth_token_timed_out(auth_token, auth_set[auth_timeout_index].integer)) { in AuthTokenMatches()