mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
ble_mesh: fix output MIC with additional data
This commit is contained in:
parent
f3e7656c06
commit
9a7efd30ef
@ -261,7 +261,7 @@ static int bt_mesh_ccm_decrypt(const u8_t key[16], u8_t nonce[13],
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < aad_len; i++, j++) {
|
||||
for (; i < aad_len; i++, j++) {
|
||||
pmsg[i] = Xn[i] ^ aad[j];
|
||||
}
|
||||
|
||||
@ -425,7 +425,7 @@ static int bt_mesh_ccm_encrypt(const u8_t key[16], u8_t nonce[13],
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < aad_len; i++, j++) {
|
||||
for (; i < aad_len; i++, j++) {
|
||||
pmsg[i] = Xn[i] ^ aad[j];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user