mirror of
https://github.com/openssl/openssl.git
synced 2025-02-23 14:42:15 +08:00
Test that SipHash_Final() fails on uninited context
Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18142)
This commit is contained in:
parent
905fec4f4d
commit
4b694f29ea
@ -262,8 +262,10 @@ static int test_siphash_basic(void)
|
||||
|
||||
/* Use invalid hash size */
|
||||
return TEST_int_eq(SipHash_set_hash_size(&siphash, 4), 0)
|
||||
&& TEST_false(SipHash_Final(&siphash, output, 0))
|
||||
/* Use hash size = 8 */
|
||||
&& TEST_true(SipHash_set_hash_size(&siphash, 8))
|
||||
&& TEST_false(SipHash_Final(&siphash, output, 8))
|
||||
&& TEST_true(SipHash_Init(&siphash, key, 0, 0))
|
||||
&& TEST_true(SipHash_Final(&siphash, output, 8))
|
||||
&& TEST_int_eq(SipHash_Final(&siphash, output, 16), 0)
|
||||
|
Loading…
Reference in New Issue
Block a user