gatt_db_read_by_type(server->db, start, end, type, q);
if (queue_isempty(q)) {
+#ifdef TIZEN_CERTIFICATE
+ if (start == 0x00ff && end == 0x00ff) {
+ ecode = BT_ATT_ERROR_AUTHENTICATION;
+ goto error;
+ }
+#endif
ecode = BT_ATT_ERROR_ATTRIBUTE_NOT_FOUND;
goto error;
}
Read Characteristic Value - Invalid Transport Access over LE or BR/EDR (0x80)
For 0x00FF UUID, return Invalid Transport Access Error
We need to register 0x00FF UUID for this
+
+ GATT/SR/GAR/BI-04-C
+ Read Characteristic Value . Insufficient Authentication (0x05)
+ For 0x2aff UUID, return authentication error
+ We need to register 0x2aff UUID for this
*/
+ const bt_uuid_t *uuid;
+ char uuidstr[MAX_LEN_UUID_STR + 1];
+
+ static const bt_uuid_t error_uuid = { .type = BT_UUID16,
+ .value.u16 = 0x2aff };
+
+ uuid = gatt_db_attribute_get_type(attr);
+
+ bt_uuid_to_string(uuid, uuidstr, sizeof(uuidstr));
+
if (handle == 0x00FF) {
ecode = 0x80;
+ } else if (!bt_uuid_cmp(&error_uuid, uuid)) {
+ ecode = BT_ATT_ERROR_AUTHENTICATION;
} else {
ecode = BT_ATT_ERROR_INVALID_HANDLE;
}
goto error;
}
+#ifdef TIZEN_CERTIFICATE
+ /* GATT/SR/GAR/BI-04-C
+ Read Characteristic Value . Insufficient Authentication (0x05)
+ For 0x2AFF UUID, return authentication error
+ We need to register 0x2aff UUID for this
+
+ */
+ const bt_uuid_t *uuid;
+ static const bt_uuid_t error_uuid = { .type = BT_UUID16,
+ .value.u16 = 0x2aff };
+
+ uuid = gatt_db_attribute_get_type(attr);
+ if (!bt_uuid_cmp(&error_uuid, uuid)) {
+ ecode = BT_ATT_ERROR_AUTHENTICATION;
+ goto error;
+ }
+#endif
+
util_debug(server->debug_callback, server->debug_data,
"Read %sReq - handle: 0x%04x",
opcode == BT_ATT_OP_READ_BLOB_REQ ? "Blob " : "",
#ifdef TIZEN_CERTIFICATE
/* GATT/SR/GAW/BI-12-C
Write Long Characteristic Value - Insufficient Authentication (0x05)
- For 0x2af8 UUID, return authentication error
- We need to register 0x2af8 UUID for this
+ For 0x2af8 or 0x2aff UUID, return authentication error
+ We need to register 0x2af8 or 0x2aff UUID for this
*/
const bt_uuid_t *uuid;
static const bt_uuid_t long_uuid = { .type = BT_UUID16,
.value.u16 = 0x2af8 };
+ static const bt_uuid_t error_uuid = { .type = BT_UUID16,
+ .value.u16 = 0x2aff };
uuid = gatt_db_attribute_get_type(attr);
- if (!bt_uuid_cmp(&long_uuid, uuid)) {
+ if (!bt_uuid_cmp(&long_uuid, uuid) || !bt_uuid_cmp(&error_uuid, uuid)) {
ecode = BT_ATT_ERROR_AUTHENTICATION;
goto error;
}