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!18660
This commit is contained in:
Jiang Jiang Jian 2022-06-30 16:49:26 +08:00
commit 7c28a05c69
2 changed files with 4 additions and 3 deletions

View File

@ -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;
} else if (i % 3 == 2) {
/* Characteristic Value */
(*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;
(*gatt_db_generated)[i].att_desc.perm = ESP_GATT_PERM_READ | ESP_GATT_PERM_WRITE ;
#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_p = protoble_internal->g_nu_lookup[i / 3].uuid128;
(*gatt_db_generated)[i].att_desc.max_length = CHAR_VAL_LEN_MAX;

View File

@ -34,7 +34,6 @@ menu "Wi-Fi Provisioning Manager"
config WIFI_PROV_BLE_FORCE_ENCRYPTION
bool
prompt "Force Link Encryption during characteristic Read / Write"
depends on BT_NIMBLE_ENABLED
default y
help
Used to enforce link encryption when attempting to read / write characteristic