ble_att_svr: fix keysize check for SC Only mode

Keysize is kept in bytes and not bits
This commit is contained in:
Krzysztof Kopyściński
2021-05-12 14:07:22 +02:00
committed by Krzysztof Kopyściński
parent 4ad4395d7c
commit 83ea568cb8
+1 -1
View File
@@ -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;