fix(attestation): restore presence-based findBoolean for KeyMint tags

KeyMint boolean tags (NO_AUTH_REQUIRED, CALLER_NONCE, etc.) use
presence-based semantics: tag exists = true, tag absent = null.
The .value?.boolValue approach fails on some AIDL implementations
where the boolValue field isn't populated despite the tag being
present, silently dropping boolean tags from attestations.
This commit is contained in:
Enginex0
2026-03-22 00:05:34 +01:00
parent 40c7b6bd15
commit 63789ba29d
@@ -157,7 +157,7 @@ data class KeyMintAttestation(
/** Maps to AOSP field = Integer */
private fun Array<KeyParameter>.findBoolean(tag: Int): Boolean? =
this.find { it.tag == tag }?.value?.boolValue
if (this.any { it.tag == tag }) true else null
/** Maps to AOSP field = Integer */
private fun Array<KeyParameter>.findInteger(tag: Int): Int? =