mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-10-01 13:08:08 +00:00
Bugfix: key size persist - nimble upstream change
This commit is contained in:
@@ -2113,6 +2113,7 @@ ble_sm_key_exch_exec(struct ble_sm_proc *proc, struct ble_sm_result *res,
|
|||||||
|
|
||||||
/* store LTK before sending since ble_sm_tx consumes tx mbuf */
|
/* store LTK before sending since ble_sm_tx consumes tx mbuf */
|
||||||
memcpy(proc->our_keys.ltk, enc_info->ltk, 16);
|
memcpy(proc->our_keys.ltk, enc_info->ltk, 16);
|
||||||
|
proc->our_keys.key_size = proc->key_size;
|
||||||
proc->our_keys.ltk_valid = 1;
|
proc->our_keys.ltk_valid = 1;
|
||||||
|
|
||||||
rc = ble_sm_tx(proc->conn_handle, txom);
|
rc = ble_sm_tx(proc->conn_handle, txom);
|
||||||
@@ -2291,6 +2292,7 @@ ble_sm_enc_info_rx(uint16_t conn_handle, struct os_mbuf **om,
|
|||||||
proc->rx_key_flags &= ~BLE_SM_KE_F_ENC_INFO;
|
proc->rx_key_flags &= ~BLE_SM_KE_F_ENC_INFO;
|
||||||
proc->peer_keys.ltk_valid = 1;
|
proc->peer_keys.ltk_valid = 1;
|
||||||
memcpy(proc->peer_keys.ltk, cmd->ltk, 16);
|
memcpy(proc->peer_keys.ltk, cmd->ltk, 16);
|
||||||
|
proc->peer_keys.key_size = proc->key_size;
|
||||||
|
|
||||||
ble_sm_key_rxed(proc, res);
|
ble_sm_key_rxed(proc, res);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user