Merge "The INCLUDE_UNIQUE_ID
parameter is not strictly expected to be in key authorizations." into main am: f692f42327
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2793532 Change-Id: Ifbabfdc3a61a1bd3f751bc84de5a0d04c18d4cd7 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
326c1f4795
1 changed files with 7 additions and 0 deletions
|
@ -420,6 +420,13 @@ pub fn check_key_authorizations(
|
|||
|
||||
//Check allowed-expected-key-parameters are present in given key authorizations list.
|
||||
expected_params.iter().all(|key_param| {
|
||||
// `INCLUDE_UNIQUE_ID` is not strictly expected to be in key authorizations but has been
|
||||
// put there by some implementations so cope with that.
|
||||
if key_param.tag == Tag::INCLUDE_UNIQUE_ID
|
||||
&& !authorizations.iter().any(|auth| auth.keyParameter.tag == key_param.tag)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if ALLOWED_TAGS_IN_KEY_AUTHS.contains(&key_param.tag) {
|
||||
assert!(
|
||||
check_key_param(authorizations, key_param),
|
||||
|
|
Loading…
Reference in a new issue