Lines Matching refs:auth_set
37 bool is_public_key_algorithm(const AuthorizationSet& auth_set) { in is_public_key_algorithm() argument
38 auto algorithm = auth_set.GetTagValue(TAG_ALGORITHM); in is_public_key_algorithm()
43 static ErrorCode authorized_purpose(const KeyPurpose purpose, const AuthorizationSet& auth_set) { in authorized_purpose() argument
49 if (auth_set.Contains(TAG_PURPOSE, purpose)) return ErrorCode::OK; in authorized_purpose()
73 const AuthorizationSet& auth_set, in AuthorizeOperation() argument
77 if (is_public_key_algorithm(auth_set)) { in AuthorizeOperation()
94 return AuthorizeBegin(purpose, keyid, auth_set, operation_params, auth_token); in AuthorizeOperation()
96 return AuthorizeUpdateOrFinish(auth_set, auth_token, op_handle); in AuthorizeOperation()
101 ErrorCode KeymasterEnforcement::AuthorizeUpdateOrFinish(const AuthorizationSet& auth_set, in AuthorizeUpdateOrFinish() argument
105 for (size_t pos = 0; pos < auth_set.size(); ++pos) { in AuthorizeUpdateOrFinish()
106 switch (auth_set[pos].tag) { in AuthorizeUpdateOrFinish()
130 for (auto& param : auth_set) { in AuthorizeUpdateOrFinish()
136 AuthTokenMatches(auth_set, auth_token, user_secure_id.value(), auth_type_index, in AuthorizeUpdateOrFinish()
148 const AuthorizationSet& auth_set, in AuthorizeBegin() argument
155 for (size_t pos = 0; pos < auth_set.size(); ++pos) { in AuthorizeBegin()
156 switch (auth_set[pos].tag) { in AuthorizeBegin()
171 ErrorCode error = authorized_purpose(purpose, auth_set); in AuthorizeBegin()
184 for (auto& param : auth_set) { in AuthorizeBegin()
235 AuthTokenMatches(auth_set, auth_token.value(), secure_id.value(), in AuthorizeBegin()
431 bool KeymasterEnforcement::AuthTokenMatches(const AuthorizationSet& auth_set, in AuthTokenMatches() argument
437 assert(auth_type_index < static_cast<int>(auth_set.size())); in AuthTokenMatches()
438 assert(auth_timeout_index < static_cast<int>(auth_set.size())); in AuthTokenMatches()
457 if (auth_type_index < 0 || auth_type_index > static_cast<int>(auth_set.size())) { in AuthTokenMatches()
462 assert(auth_set[auth_type_index].tag == TAG_USER_AUTH_TYPE); in AuthTokenMatches()
463 auto key_auth_type_mask = authorizationValue(TAG_USER_AUTH_TYPE, auth_set[auth_type_index]); in AuthTokenMatches()
473 assert(auth_set[auth_timeout_index].tag == TAG_AUTH_TIMEOUT); in AuthTokenMatches()
475 authorizationValue(TAG_AUTH_TIMEOUT, auth_set[auth_timeout_index]); in AuthTokenMatches()