summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Eran Messeri <eranm@google.com> 2018-04-12 14:06:59 +0100
committer Eran Messeri <eranm@google.com> 2018-04-12 17:20:35 +0100
commit52dcedca37a08bcd01f8d060e269d4eb3745831f (patch)
tree24e18558d2e884c6402fb618517bf9bbbad4f47f
parent0b5dd8e56040e2cd3dc95abfebe7fdb71cc7f0bc (diff)
AttestationUtils: Request MEID explicitly
Rather than rely on getDeviceId to provide the MEID, explicitly use getMeid to get it. For MEID attestation to work, the right identifier needs to be passed in for attestation by Keymaster. AttestationUtils currently gets this identifier by calling getDeviceId. This would only yield the MEID if the device does not have an IMEI provisioned, which means it'll get the IMEI for devices that have both (like Pixel 2). According to bartfab@ that is the correct way (see b/77584730#13). Bug: 77584730 Bug: 73284024 Test: runtest --path cts/tests/tests/keystore/src/android/keystore/cts/KeyAttestationTest.java Change-Id: I98f6c2e2a9835bf2fd681cfb4ff74fc3984c3a8e
-rw-r--r--keystore/java/android/security/keystore/AttestationUtils.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/keystore/java/android/security/keystore/AttestationUtils.java b/keystore/java/android/security/keystore/AttestationUtils.java
index efee8b497ab8..1be8309bcf5a 100644
--- a/keystore/java/android/security/keystore/AttestationUtils.java
+++ b/keystore/java/android/security/keystore/AttestationUtils.java
@@ -156,7 +156,7 @@ public abstract class AttestationUtils {
break;
}
case ID_TYPE_MEID: {
- final String meid = telephonyService.getDeviceId();
+ final String meid = telephonyService.getMeid(0);
if (meid == null) {
throw new DeviceIdAttestationException("Unable to retrieve MEID");
}