[test] Add HMAC self-tests

The HMAC code is already tested indirectly via several consuming
algorithms that themselves provide self-tests (e.g. HMAC-DRBG, NTLM
authentication, and PeerDist content identification), but lacks any
direct test vectors.

Add explicit HMAC tests and ensure that corner cases such as empty
keys, block-length keys, and over-length keys are all covered.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2022-10-10 12:01:38 +01:00
parent 081b3eefc4
commit 88419b608d
2 changed files with 212 additions and 0 deletions

View File

@@ -77,3 +77,4 @@ REQUIRE_OBJECT ( zlib_test );
REQUIRE_OBJECT ( gzip_test );
REQUIRE_OBJECT ( utf8_test );
REQUIRE_OBJECT ( acpi_test );
REQUIRE_OBJECT ( hmac_test );