nr pdcp: bugfix: reset integrity context

CMAC_Init has to be called between each usage of the cmac context.
This commit is contained in:
Cedric Roux
2021-04-29 15:15:18 +02:00
parent 3caa78ea9a
commit d2c9b7cb5a
@@ -63,6 +63,7 @@ void nr_pdcp_integrity_nia2_integrity(void *integrity_context,
* (which is identical to 128-NIA2, see 33.501 D.3.1.3) */
compute_t(t, count, bearer, direction);
CMAC_Init(ctx, NULL, 0, NULL, NULL);
CMAC_Update(ctx, t, 8);
CMAC_Update(ctx, buffer, length);
CMAC_Final(ctx, mac, &maclen);