mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-08-05 01:27:56 +00:00
ble_att_svr: fix keysize check for SC Only mode
Keysize is kept in bytes and not bits
This commit is contained in:
committed by
Krzysztof Kopyściński
parent
4ad4395d7c
commit
83ea568cb8
@@ -288,7 +288,7 @@ ble_att_svr_check_perms(uint16_t conn_handle, int is_read,
|
||||
* require it on level 4
|
||||
*/
|
||||
if (MYNEWT_VAL(BLE_SM_SC_ONLY)) {
|
||||
if (sec_state.key_size != 128 ||
|
||||
if (sec_state.key_size != 16 ||
|
||||
!sec_state.authenticated ||
|
||||
!sec_state.encrypted) {
|
||||
return BLE_ATT_ERR_INSUFFICIENT_KEY_SZ;
|
||||
|
||||
Reference in New Issue
Block a user