From 63f023474868a01b8bc183a94db17f60b468ff73 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Mon, 19 Mar 2018 13:07:58 +0100 Subject: [PATCH] test: fix hash unit test for NSS Some hash functions in the freebl3 library ignore the length of the output buffer and always return the length of the digest. --- test/unit/hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/hash.c b/test/unit/hash.c index 8aab74f..2275473 100644 --- a/test/unit/hash.c +++ b/test/unit/hash.c @@ -106,7 +106,7 @@ test_unit(void) if (j >= tests[i].length) TEST_CHECK(length == tests[i].length); else - TEST_CHECK(length == 0 || length == j); + TEST_CHECK(length == 0 || length == j || length == tests[i].length); TEST_CHECK(!memcmp(out, tests[i].out, length)); }