diff options
author | Eran Messeri <eranm@google.com> | 2023-10-20 16:14:01 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2023-10-20 16:14:01 +0000 |
commit | f692f4232708f7447a0f801b66dcbd74e067065b (patch) | |
tree | 1f1ed3e51a4239f7b52da83eebd6586d0a437feb /keystore2 | |
parent | 6ec35f44619342de1d0b426f4c4e2b31820820a6 (diff) | |
parent | 17a926156035925b05aebdff4acde42a1a669e01 (diff) | |
download | security-f692f4232708f7447a0f801b66dcbd74e067065b.tar.gz |
Merge "The `INCLUDE_UNIQUE_ID` parameter is not strictly expected to be in key authorizations." into main
Diffstat (limited to 'keystore2')
-rw-r--r-- | keystore2/test_utils/key_generations.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/keystore2/test_utils/key_generations.rs b/keystore2/test_utils/key_generations.rs index 0ffc32af..badc4806 100644 --- a/keystore2/test_utils/key_generations.rs +++ b/keystore2/test_utils/key_generations.rs @@ -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), |