kopia lustrzana https://github.com/espressif/esp-idf
Merge branch 'bugfix/configure_link_encryption_for_charac_v4.4' into 'release/v4.4'
WifiProv: Add configuration support for forcing link encryption (v4.4) See merge request espressif/esp-idf!18660pull/9338/head
commit
7c28a05c69
|
@ -405,8 +405,10 @@ static ssize_t populate_gatt_db(esp_gatts_attr_db_t **gatt_db_generated)
|
||||||
(*gatt_db_generated)[i].att_desc.value = (uint8_t *) &character_prop_read_write;
|
(*gatt_db_generated)[i].att_desc.value = (uint8_t *) &character_prop_read_write;
|
||||||
} else if (i % 3 == 2) {
|
} else if (i % 3 == 2) {
|
||||||
/* Characteristic Value */
|
/* Characteristic Value */
|
||||||
(*gatt_db_generated)[i].att_desc.perm = ESP_GATT_PERM_READ | ESP_GATT_PERM_WRITE | \
|
(*gatt_db_generated)[i].att_desc.perm = ESP_GATT_PERM_READ | ESP_GATT_PERM_WRITE ;
|
||||||
ESP_GATT_PERM_READ_ENCRYPTED | ESP_GATT_PERM_WRITE_ENCRYPTED;
|
#if CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION
|
||||||
|
(*gatt_db_generated)[i].att_desc.perm |= ESP_GATT_PERM_READ_ENCRYPTED | ESP_GATT_PERM_WRITE_ENCRYPTED;
|
||||||
|
#endif
|
||||||
(*gatt_db_generated)[i].att_desc.uuid_length = ESP_UUID_LEN_128;
|
(*gatt_db_generated)[i].att_desc.uuid_length = ESP_UUID_LEN_128;
|
||||||
(*gatt_db_generated)[i].att_desc.uuid_p = protoble_internal->g_nu_lookup[i / 3].uuid128;
|
(*gatt_db_generated)[i].att_desc.uuid_p = protoble_internal->g_nu_lookup[i / 3].uuid128;
|
||||||
(*gatt_db_generated)[i].att_desc.max_length = CHAR_VAL_LEN_MAX;
|
(*gatt_db_generated)[i].att_desc.max_length = CHAR_VAL_LEN_MAX;
|
||||||
|
|
|
@ -34,7 +34,6 @@ menu "Wi-Fi Provisioning Manager"
|
||||||
config WIFI_PROV_BLE_FORCE_ENCRYPTION
|
config WIFI_PROV_BLE_FORCE_ENCRYPTION
|
||||||
bool
|
bool
|
||||||
prompt "Force Link Encryption during characteristic Read / Write"
|
prompt "Force Link Encryption during characteristic Read / Write"
|
||||||
depends on BT_NIMBLE_ENABLED
|
|
||||||
default y
|
default y
|
||||||
help
|
help
|
||||||
Used to enforce link encryption when attempting to read / write characteristic
|
Used to enforce link encryption when attempting to read / write characteristic
|
||||||
|
|
Ładowanie…
Reference in New Issue