summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEran Messeri <eranm@google.com>2021-02-04 00:53:50 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-02-04 00:53:50 +0000
commitfbf8078dabf82b3f3bb2ae3e5430b8a018e56179 (patch)
treeab164b87f8a1c659e1e60733ba1f1e2d51653225
parentb79ed6ec8503b30393781616c16e4e3d2288f47c (diff)
parent86a00f126d8583f0da8bfd40253b3aa6b80fa0b3 (diff)
downloadplatform_packages_apps_KeyChain-fbf8078dabf82b3f3bb2ae3e5430b8a018e56179.tar.gz
platform_packages_apps_KeyChain-fbf8078dabf82b3f3bb2ae3e5430b8a018e56179.tar.bz2
platform_packages_apps_KeyChain-fbf8078dabf82b3f3bb2ae3e5430b8a018e56179.zip
Revert "Add check for misprovisioned Pixel 2 device." am: 7a4bacbb0b am: 86a00f126d
Original change: https://android-review.googlesource.com/c/platform/packages/apps/KeyChain/+/1549374 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I1152bf0bdb46fc9e832c0bebfc185e081bfc9f5d
-rw-r--r--src/com/android/keychain/KeyChainService.java27
1 files changed, 1 insertions, 26 deletions
diff --git a/src/com/android/keychain/KeyChainService.java b/src/com/android/keychain/KeyChainService.java
index 6c03fa1..128c8c8 100644
--- a/src/com/android/keychain/KeyChainService.java
+++ b/src/com/android/keychain/KeyChainService.java
@@ -251,7 +251,7 @@ public class KeyChainService extends IntentService {
Arrays.toString(idAttestationFlags)));
}
- KeymasterArguments attestArgs;
+ final KeymasterArguments attestArgs;
try {
attestArgs = AttestationUtils.prepareAttestationArguments(
mContext, idAttestationFlags, attestationChallenge);
@@ -259,31 +259,6 @@ public class KeyChainService extends IntentService {
Log.e(TAG, "Failed collecting attestation data", e);
return KeyChain.KEY_ATTESTATION_CANNOT_COLLECT_DATA;
}
- int errorCode = checkKeyChainStatus(alias, attestationChain, attestArgs);
- if (errorCode == KeyChain.KEY_ATTESTATION_CANNOT_ATTEST_IDS) {
- // b/69471841: id attestation might fail due to incorrect provisioning of device
- try {
- attestArgs =
- AttestationUtils.prepareAttestationArgumentsIfMisprovisioned(
- mContext, idAttestationFlags, attestationChallenge);
- if (attestArgs == null) {
- return errorCode;
- }
- } catch (DeviceIdAttestationException e) {
- Log.e(TAG, "Failed collecting attestation data "
- + "during second attempt on misprovisioned device", e);
- return KeyChain.KEY_ATTESTATION_CANNOT_COLLECT_DATA;
- }
- }
-
- return checkKeyChainStatus(alias, attestationChain, attestArgs);
- }
-
- private int checkKeyChainStatus(
- String alias,
- KeymasterCertificateChain attestationChain,
- KeymasterArguments attestArgs) {
-
final String keystoreAlias = Credentials.USER_PRIVATE_KEY + alias;
final int errorCode = mKeyStore.attestKey(keystoreAlias, attestArgs, attestationChain);
if (errorCode != KeyStore.NO_ERROR) {