projects
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
905fec4
)
Test that SipHash_Final() fails on uninited context
author
Tomas Mraz
<tomas@openssl.org>
Thu, 21 Apr 2022 15:13:44 +0000
(17:13 +0200)
committer
Tomas Mraz
<tomas@openssl.org>
Wed, 27 Apr 2022 08:05:03 +0000
(10:05 +0200)
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18142)
test/siphash_internal_test.c
patch
|
blob
|
history
diff --git
a/test/siphash_internal_test.c
b/test/siphash_internal_test.c
index 03824ea8ec4820b45d1a9a419cfbabb9a739a9e3..7626bab98c29b3a0c988f07d43d01bdeca1f49de 100644
(file)
--- a/
test/siphash_internal_test.c
+++ b/
test/siphash_internal_test.c
@@
-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)