diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-06-26 21:43:03 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-06-26 21:43:03 +0000 |
commit | 2cb33028a02436051065b23ad55db160739a2400 (patch) | |
tree | 427eda775c48afa86bf2219797d8a8c19fe43b0d | |
parent | 4f144ec6962d1f936c1f872db1c030f1f6fd8139 (diff) | |
parent | dbea77ebb5345c9ce1d84db198ae78d7b1536fe5 (diff) | |
download | security-2cb33028a02436051065b23ad55db160739a2400.tar.gz |
Snap for 8770092 from dbea77ebb5345c9ce1d84db198ae78d7b1536fe5 to mainline-mediaprovider-releaseaml_mpr_331918000aml_mpr_331812020aml_mpr_331711020aml_mpr_331613010aml_mpr_331512020aml_mpr_331412040aml_mpr_331311080aml_mpr_331112050aml_mpr_331112030aml_mpr_331011070aml_mpr_330911040aml_mpr_330811020android13-mainline-mediaprovider-release
Change-Id: Ie332d721d2f7056bb29e89f2daf84b888b59c521
-rw-r--r-- | keystore2/src/attestation_key_utils.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/keystore2/src/attestation_key_utils.rs b/keystore2/src/attestation_key_utils.rs index 8354ba5c..34089425 100644 --- a/keystore2/src/attestation_key_utils.rs +++ b/keystore2/src/attestation_key_utils.rs @@ -59,8 +59,11 @@ pub fn get_attest_key_info( db: &mut KeystoreDB, ) -> Result<Option<AttestationKeyInfo>> { let challenge_present = params.iter().any(|kp| kp.tag == Tag::ATTESTATION_CHALLENGE); + let is_device_unique_attestation = + params.iter().any(|kp| kp.tag == Tag::DEVICE_UNIQUE_ATTESTATION); match attest_key_descriptor { - None if challenge_present => rem_prov_state + // Do not select an RKP key if DEVICE_UNIQUE_ATTESTATION is present. + None if challenge_present && !is_device_unique_attestation => rem_prov_state .get_remotely_provisioned_attestation_key_and_certs(key, caller_uid, params, db) .context(concat!( "In get_attest_key_and_cert_chain: ", |