mirror of
https://git.proxmox.com/git/mirror_zfs
synced 2025-04-28 06:00:44 +00:00
convert_wycheproof: don't check tag len on invalid tests
Sponsored-by: https://despairlabs.com/sponsor/ Signed-off-by: Rob Norris <robn@despairlabs.com> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Reviewed-by: Attila Fülöp <attila@fueloep.org>
This commit is contained in:
parent
cb4b854838
commit
6e89095873
@ -143,11 +143,20 @@ for my $group (@{$data->{testGroups}}) {
|
||||
my ($id, $comment, $iv, $key, $msg, $ct, $aad, $tag, $result) =
|
||||
@$test{qw(tcId comment iv key msg ct aad tag result)};
|
||||
|
||||
# sanity check; iv, key and tag must have the length declared
|
||||
# by the group params
|
||||
# sanity check; iv and key must have the length declared by the
|
||||
# group params.
|
||||
unless (
|
||||
length_check($id, 'iv', $iv, $iv_size) &&
|
||||
length_check($id, 'key', $key, $key_size) &&
|
||||
length_check($id, 'key', $key, $key_size)) {
|
||||
$skipped++;
|
||||
next;
|
||||
}
|
||||
|
||||
# sanity check; tag must have the length declared by the group
|
||||
# param, but only for valid tests (invalid tests should be
|
||||
# rejected, and so can't produce a tag anyway)
|
||||
unless (
|
||||
$result eq 'invalid' ||
|
||||
length_check($id, 'tag', $tag, $tag_size)) {
|
||||
$skipped++;
|
||||
next;
|
||||
|
Loading…
Reference in New Issue
Block a user