Bugfix: key size persist - nimble upstream change

This commit is contained in:
Onkar
2021-12-30 12:54:51 +05:30
parent adbc842f7c
commit aa7b41d7b7
+2
View File
@@ -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 */
memcpy(proc->our_keys.ltk, enc_info->ltk, 16);
proc->our_keys.key_size = proc->key_size;
proc->our_keys.ltk_valid = 1;
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->peer_keys.ltk_valid = 1;
memcpy(proc->peer_keys.ltk, cmd->ltk, 16);
proc->peer_keys.key_size = proc->key_size;
ble_sm_key_rxed(proc, res);
}