mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-10-05 22:37:23 +00:00
nimble/host: Restore key size for LTK
When LTK is restored successfully we also need to update key size for proc with proper value as otherwise we default to 0 which means that e.g. any characteristic which requires proper key size for read/write cannot be accessed.
This commit is contained in:
@@ -1306,6 +1306,7 @@ ble_sm_ltk_restore_exec(struct ble_sm_proc *proc, struct ble_sm_result *res,
|
|||||||
proc->conn_handle, value_sec->ltk);
|
proc->conn_handle, value_sec->ltk);
|
||||||
|
|
||||||
if (res->app_status == 0) {
|
if (res->app_status == 0) {
|
||||||
|
proc->key_size = value_sec->key_size;
|
||||||
if (value_sec->authenticated) {
|
if (value_sec->authenticated) {
|
||||||
proc->flags |= BLE_SM_PROC_F_AUTHENTICATED;
|
proc->flags |= BLE_SM_PROC_F_AUTHENTICATED;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user