mirror of https://github.com/ARMmbed/mbed-os.git
Removing incorrect context free
After deriving JSEncKey we were wrongly clearing the AES context. We shouldn't clear the context until the function is done doing its job. That was why JSINtKey derivation was wrong which would result in MIC failures.feature-lorawan-1-1
parent
e490fbf991
commit
ce6733edc0
|
@ -31,7 +31,6 @@
|
|||
#include "system/lorawan_data_structures.h"
|
||||
#include "mbedtls/platform.h"
|
||||
|
||||
|
||||
#if defined(MBEDTLS_CMAC_C) && defined(MBEDTLS_AES_C) && defined(MBEDTLS_CIPHER_C)
|
||||
|
||||
LoRaMacCrypto::LoRaMacCrypto()
|
||||
|
@ -360,7 +359,6 @@ int LoRaMacCrypto::compute_join_server_keys(const uint8_t *key, uint32_t key_len
|
|||
if (0 != ret)
|
||||
goto exit;
|
||||
|
||||
mbedtls_aes_free(&aes_ctx);
|
||||
memset(nonce, 0, sizeof(nonce));
|
||||
nonce[0] = 0x06;
|
||||
memcpy(nonce + 1, eui, 8);
|
||||
|
|
Loading…
Reference in New Issue