--- android/gatt.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/android/gatt.c b/android/gatt.c index 3f98e71..2e3a5c9 100644 --- a/android/gatt.c +++ b/android/gatt.c @@ -4683,9 +4683,15 @@ static uint8_t check_device_permissions(struct gatt_device *device, if (!(permissions & GATT_PERM_WRITE_SIGNED)) return ATT_ECODE_WRITE_NOT_PERM; - if ((permissions & GATT_PERM_WRITE_SIGNED_MITM) && - sec_level < BT_SECURITY_HIGH) + if (permissions & GATT_PERM_WRITE_SIGNED_MITM) { + bool auth; + + if (bt_get_csrk(&device->bdaddr, true, NULL, NULL, + &auth) && auth) + break; + return ATT_ECODE_AUTHENTICATION; + } break; case ATT_OP_READ_BY_TYPE_REQ: case ATT_OP_READ_REQ: -- 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html