summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/sha256.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/sha256.c b/test/sha256.c
index 9bb99bb6ab..6af3fb1343 100644
--- a/test/sha256.c
+++ b/test/sha256.c
@@ -164,7 +164,7 @@ static int test_hmac(const uint8_t *key, int key_len,
hmac_SHA256(tmp, key, key_len, input, input_len);
- if (memcmp(tmp, output, sizeof(output)) != 0) {
+ if (memcmp(tmp, output, SHA256_DIGEST_SIZE) != 0) {
ccprintf("hmac_SHA256 test failed\n");
return 0;
}