From 0695c777657119a3089da73f097652a144e35440 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Sat, 13 May 2023 23:15:54 -0400 Subject: [PATCH] drop constant for disabling attest key There is no other option on devices using remote key provisioning since it's incompatible with pinning without this feature. --- .../java/app/attestation/auditor/AttestationProtocol.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/main/java/app/attestation/auditor/AttestationProtocol.java b/app/src/main/java/app/attestation/auditor/AttestationProtocol.java index f5fe95d31..55aa06ea1 100644 --- a/app/src/main/java/app/attestation/auditor/AttestationProtocol.java +++ b/app/src/main/java/app/attestation/auditor/AttestationProtocol.java @@ -121,7 +121,6 @@ class AttestationProtocol { private static final int FINGERPRINT_LENGTH = FINGERPRINT_HASH_FUNCTION.bits() / 8; private static final boolean PREFER_STRONGBOX = true; - private static final boolean USE_ATTEST_KEY = true; // Challenge message: // @@ -1417,8 +1416,7 @@ static AttestationResult generateSerialized(final Context context, final byte[] final String attestationKeystoreAlias; final boolean useStrongBox; @SuppressLint("InlinedApi") - final boolean canUseAttestKey = (alwaysHasAttestKey || pm.hasSystemFeature(PackageManager.FEATURE_KEYSTORE_APP_ATTEST_KEY)) - && USE_ATTEST_KEY; + final boolean canUseAttestKey = (alwaysHasAttestKey || pm.hasSystemFeature(PackageManager.FEATURE_KEYSTORE_APP_ATTEST_KEY)); final boolean useAttestKey; if (hasPersistentKey) { final String freshKeyStoreAlias = statePrefix + KEYSTORE_ALIAS_FRESH;