HomeFreeBSD

test/sys/opencrypto: Fix NIST KAT parser iterator

Description

test/sys/opencrypto: Fix NIST KAT parser iterator

When yield a.k.a "generator" iterator is used we need to return all
data using "yield", before returning from the function.
Because of that only encryption tests were run for AES-CBC, other modes
were affected as well.
Add one more loop to the iterator "next" routine to fix that.
This unveiled a problem in the GCM AEAD parser logic, which didn't
correctly handle tests cases with empty plaintext, i.e. AAD only.
Include the fix in this patch as it's a rather trivial one.

Obtained from: Semihalf
Differential Revision: https://reviews.freebsd.org/D36861

Details

Provenance
kdAuthored on Oct 6 2022, 2:20 PM
Differential Revision
D36861: test/sys/opencrypto: Fix NIST KAT parser iterator
Parents
rGdc39a3346e7d: Make #if and #endif do what people expect in *_if.m
Branches
Unknown
Tags
Unknown