From: Miroslav Lichvar Date: Mon, 19 Mar 2018 12:07:58 +0000 (+0100) Subject: test: fix hash unit test for NSS X-Git-Tag: 3.3~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63f023474868a01b8bc183a94db17f60b468ff73;p=thirdparty%2Fchrony.git 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. --- diff --git a/test/unit/hash.c b/test/unit/hash.c index 8aab74f8..2275473e 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)); }