goto error;
}
+#ifdef TIZEN_CERTIFICATE
+ /* GATT/SR/GAW/BI-05-C
+ Write 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,
"Write %s - handle: 0x%04x",
(opcode == BT_ATT_OP_WRITE_REQ) ? "Req" : "Cmd",
attr = gatt_db_get_attribute(server->db, handle);
if (!attr) {
+#ifdef TIZEN_CERTIFICATE
+ /* GATT/SR/GAR/BI-34-C
+ GATT/SR/GAR/BI-35-C
+ 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
+ */
+
+ if (handle == 0x00FF) {
+ ecode = 0x80;
+ } else {
+ ecode = BT_ATT_ERROR_INVALID_HANDLE;
+ }
+#else
ecode = BT_ATT_ERROR_INVALID_HANDLE;
+#endif
goto error;
}
goto error;
}
+#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
+ */
+ const bt_uuid_t *uuid;
+ static const bt_uuid_t long_uuid = { .type = BT_UUID16,
+ .value.u16 = 0x2af8 };
+
+ uuid = gatt_db_attribute_get_type(attr);
+ if (!bt_uuid_cmp(&long_uuid, uuid)) {
+ ecode = BT_ATT_ERROR_AUTHENTICATION;
+ goto error;
+ }
+#endif
+
util_debug(server->debug_callback, server->debug_data,
"Prep Write Req - handle: 0x%04x", handle);