Commit ab8b71a3 authored by Dan Mihai's avatar Dan Mihai Committed by Nathan Heldt-Sheller

[IOT-2121] [IOT-2116] Fix CTT "message mac does not match"

Test case CT1.7.2.1-2 from CTT v1.5.6 fails with "message mac does
not match":
- After CTT successfully posted the owner credential
- While trying to establish a new DTLS session, using the new

Change-Id: I282632d1071c76afba629081d6853d376c347473
Signed-off-by: default avatarDan Mihai <>
Reviewed-on: default avatarKevin Kane <>
Reviewed-by: Nathan Heldt-Sheller's avatarNathan Heldt-Sheller <>
Tested-by: Nathan Heldt-Sheller's avatarNathan Heldt-Sheller <>
parent 8ce393a1
......@@ -2403,7 +2403,7 @@ static int pHash (const unsigned char *key, size_t keyLen,
CHECK_MBEDTLS_RET(mbedtls_md_hmac_starts, &hmacP, key, keyLen);
while (len + dLen < bufLen)
while (len + dLen <= bufLen)
CHECK_MBEDTLS_RET(mbedtls_md_hmac_reset, &hmacP);
CHECK_MBEDTLS_RET(mbedtls_md_hmac_starts, &hmacP, key, keyLen);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment