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
90 if (auth_set.Contains(TAG_PURPOSE, purpose)) return KM_ERROR_OK; in authorized_purpose()
118 const AuthProxy& auth_set, in AuthorizeOperation() argument
122 if (is_public_key_algorithm(auth_set)) { in AuthorizeOperation()
140 return AuthorizeBegin(purpose, keyid, auth_set, operation_params); in AuthorizeOperation()
142 return AuthorizeUpdateOrFinish(auth_set, operation_params, op_handle); in AuthorizeOperation()
148 KeymasterEnforcement::AuthorizeUpdateOrFinish(const AuthProxy& auth_set, in AuthorizeUpdateOrFinish() argument
153 for (size_t pos = 0; pos < auth_set.size(); ++pos) { in AuthorizeUpdateOrFinish()
154 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()
235 for (auto& param : auth_set) { in AuthorizeBegin()
277 if (AuthTokenMatches(auth_set, operation_params, param.long_integer, in AuthorizeBegin()
481 bool KeymasterEnforcement::AuthTokenMatches(const AuthProxy& auth_set, in AuthTokenMatches() argument
487 assert(auth_type_index < static_cast<int>(auth_set.size())); in AuthTokenMatches()
488 assert(auth_timeout_index < static_cast<int>(auth_set.size())); in AuthTokenMatches()
505 if (auth_type_index < 0 || auth_type_index > static_cast<int>(auth_set.size())) { in AuthTokenMatches()
510 assert(auth_set[auth_type_index].tag == KM_TAG_USER_AUTH_TYPE); in AuthTokenMatches()
511 if (auth_set[auth_type_index].tag != KM_TAG_USER_AUTH_TYPE) return false; in AuthTokenMatches()
513 uint32_t key_auth_type_mask = auth_set[auth_type_index].integer; in AuthTokenMatches()
521 assert(auth_set[auth_timeout_index].tag == KM_TAG_AUTH_TIMEOUT); in AuthTokenMatches()
522 if (auth_set[auth_timeout_index].tag != KM_TAG_AUTH_TIMEOUT) return false; in AuthTokenMatches()
524 if (auth_token_timed_out(*auth_token, auth_set[auth_timeout_index].integer)) { in AuthTokenMatches()