summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-07-11 19:45:48 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-07-11 19:45:48 +0000
commitbb3ffddc262e1457683ab24f79d6b4ad3b0db65a (patch)
tree427eda775c48afa86bf2219797d8a8c19fe43b0d
parentfd17d5f1276ae49bb8fe805a441f3dc13e82040d (diff)
parentdbea77ebb5345c9ce1d84db198ae78d7b1536fe5 (diff)
downloadsecurity-android13-mainline-go-conscrypt-release.tar.gz
Snap for 8817865 from dbea77ebb5345c9ce1d84db198ae78d7b1536fe5 to mainline-go-conscrypt-releaseaml_go_con_330913000android13-mainline-go-conscrypt-release
Change-Id: I117ab7084d158cb1aac65d5b0e1d8bcd15cb890e
-rw-r--r--keystore2/src/attestation_key_utils.rs5
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: ",