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:
@@ -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? =
|
||||
|
||||
Reference in New Issue
Block a user