BlueZ contained superfluous properties that not only did nothing of value, but needlessly created CEP descriptors for any characteristic with a secure/encrypted/authenticated flag applied to it. This actually deviated from the spec(Bluetooth core 5.3, 3.3.3.1) by setting the reserved bits in the CEPD. --- src/gatt-database.c | 6 ------ src/shared/att-types.h | 8 -------- 2 files changed, 14 deletions(-) diff --git a/src/gatt-database.c b/src/gatt-database.c index 99c95f2d6..1f7ce5f02 100644 --- a/src/gatt-database.c +++ b/src/gatt-database.c @@ -1656,27 +1656,21 @@ static bool parse_chrc_flags(DBusMessageIter *array, uint8_t *props, *ext_props |= BT_GATT_CHRC_EXT_PROP_WRITABLE_AUX; } else if (!strcmp("encrypt-read", flag)) { *props |= BT_GATT_CHRC_PROP_READ; - *ext_props |= BT_GATT_CHRC_EXT_PROP_ENC_READ; *perm |= BT_ATT_PERM_READ | BT_ATT_PERM_READ_ENCRYPT; } else if (!strcmp("encrypt-write", flag)) { *props |= BT_GATT_CHRC_PROP_WRITE; - *ext_props |= BT_GATT_CHRC_EXT_PROP_ENC_WRITE; *perm |= BT_ATT_PERM_WRITE | BT_ATT_PERM_WRITE_ENCRYPT; } else if (!strcmp("encrypt-authenticated-read", flag)) { *props |= BT_GATT_CHRC_PROP_READ; - *ext_props |= BT_GATT_CHRC_EXT_PROP_AUTH_READ; *perm |= BT_ATT_PERM_READ | BT_ATT_PERM_READ_AUTHEN; } else if (!strcmp("encrypt-authenticated-write", flag)) { *props |= BT_GATT_CHRC_PROP_WRITE; - *ext_props |= BT_GATT_CHRC_EXT_PROP_AUTH_WRITE; *perm |= BT_ATT_PERM_WRITE | BT_ATT_PERM_WRITE_AUTHEN; } else if (!strcmp("secure-read", flag)) { *props |= BT_GATT_CHRC_PROP_READ; - *ext_props |= BT_GATT_CHRC_EXT_PROP_AUTH_READ; *perm |= BT_ATT_PERM_READ | BT_ATT_PERM_READ_SECURE; } else if (!strcmp("secure-write", flag)) { *props |= BT_GATT_CHRC_PROP_WRITE; - *ext_props |= BT_GATT_CHRC_EXT_PROP_AUTH_WRITE; *perm |= BT_ATT_PERM_WRITE | BT_ATT_PERM_WRITE_SECURE; } else if (!strcmp("authorize", flag)) { *req_prep_authorization = true; diff --git a/src/shared/att-types.h b/src/shared/att-types.h index 3adc05d9e..a08b24155 100644 --- a/src/shared/att-types.h +++ b/src/shared/att-types.h @@ -151,14 +151,6 @@ struct bt_att_pdu_error_rsp { /* GATT Characteristic Extended Properties Bitfield values */ #define BT_GATT_CHRC_EXT_PROP_RELIABLE_WRITE 0x01 #define BT_GATT_CHRC_EXT_PROP_WRITABLE_AUX 0x02 -#define BT_GATT_CHRC_EXT_PROP_ENC_READ 0x04 -#define BT_GATT_CHRC_EXT_PROP_ENC_WRITE 0x08 -#define BT_GATT_CHRC_EXT_PROP_ENC (BT_GATT_CHRC_EXT_PROP_ENC_READ | \ - BT_GATT_CHRC_EXT_PROP_ENC_WRITE) -#define BT_GATT_CHRC_EXT_PROP_AUTH_READ 0x10 -#define BT_GATT_CHRC_EXT_PROP_AUTH_WRITE 0x20 -#define BT_GATT_CHRC_EXT_PROP_AUTH (BT_GATT_CHRC_EXT_PROP_AUTH_READ | \ - BT_GATT_CHRC_EXT_PROP_AUTH_WRITE) /* GATT Characteristic Client Features Bitfield values */ #define BT_GATT_CHRC_CLI_FEAT_ROBUST_CACHING 0x01 -- 2.31.1