fix(interception): make NO_AUTH_REQUIRED conditional in KeyMetadata authorizations

Upstream removed the unconditional NO_AUTH_REQUIRED from toAuthorizations.
A key generated with auth requirements would incorrectly report
NO_AUTH_REQUIRED in metadata, creating a detectable inconsistency
with the attestation extension.
This commit is contained in:
Enginex0
2026-03-19 09:48:08 +01:00
parent fef17c07ec
commit 4d5e94f835
@@ -985,7 +985,9 @@ private fun KeyMintAttestation.toAuthorizations(
authList.add(createAuth(Tag.MAX_BOOT_LEVEL, KeyParameterValue.integer(this.maxBootLevel)))
}
if (this.noAuthRequired != false) {
authList.add(createAuth(Tag.NO_AUTH_REQUIRED, KeyParameterValue.boolValue(true)))
}
authList.add(createAuth(Tag.ORIGIN, KeyParameterValue.origin(this.origin ?: KeyOrigin.GENERATED)))
authList.add(createAuth(Tag.OS_VERSION, KeyParameterValue.integer(AndroidDeviceUtils.osVersion)))