]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[test] Add HMAC self-tests
authorMichael Brown <mcb30@ipxe.org>
Mon, 10 Oct 2022 11:01:38 +0000 (12:01 +0100)
committerMichael Brown <mcb30@ipxe.org>
Mon, 10 Oct 2022 11:17:39 +0000 (12:17 +0100)
commit88419b608d71247445de287c9f8bebbf5e33e0c8
treedd8bb32a82cfd35b7e63995f617ed37e93b230ab
parent081b3eefc48953795122c4b1a38430498e2bb2b6
[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>
src/tests/hmac_test.c [new file with mode: 0644]
src/tests/tests.c