fix(interception): restore noAuthRequired default and callerNonce attestation
NO_AUTH_REQUIRED should be added to authorizations when not explicitly disabled (!= false), matching AOSP default behavior. The != null check from PR157 drops the tag for keys where noAuthRequired was parsed as null (e.g. persisted keys), creating an attestation/authorization mismatch that detectors can spot. Also restores CALLER_NONCE in softwareEnforced attestation list.
This commit is contained in:
@@ -516,6 +516,11 @@ object AttestationBuilder {
|
||||
)
|
||||
)
|
||||
}
|
||||
if (params.callerNonce == true) {
|
||||
list.add(
|
||||
DERTaggedObject(true, AttestationConstants.TAG_CALLER_NONCE, DERNull.INSTANCE)
|
||||
)
|
||||
}
|
||||
if (params.unlockedDeviceRequired == true) {
|
||||
list.add(
|
||||
DERTaggedObject(
|
||||
|
||||
+2
-4
@@ -1069,10 +1069,8 @@ private fun KeyMintAttestation.toAuthorizations(
|
||||
)
|
||||
}
|
||||
|
||||
if (this.noAuthRequired != null) {
|
||||
authList.add(
|
||||
createAuth(Tag.NO_AUTH_REQUIRED, KeyParameterValue.boolValue(this.noAuthRequired))
|
||||
)
|
||||
if (this.noAuthRequired != false) {
|
||||
authList.add(createAuth(Tag.NO_AUTH_REQUIRED, KeyParameterValue.boolValue(true)))
|
||||
}
|
||||
|
||||
if (this.callerNonce == true) {
|
||||
|
||||
Reference in New Issue
Block a user