Commit 867519c
committed
Functional test: Fix build for MLK_CONFIG_NO_RANDOMIZED_API
The reduced-API refactor guarded the randomized round-trip tests in
test_mlkem.c on !NO_KEYPAIR_API && !NO_ENCAPS_API && !NO_DECAPS_API, but
omitted !NO_RANDOMIZED_API. The public header only exposes
crypto_kem_keypair() and crypto_kem_enc() when NO_RANDOMIZED_API is
unset (nested inside the keypair/encaps API guards), so a plain
CFLAGS="-DMLK_CONFIG_NO_RANDOMIZED_API" make failed to compile
test_mlkem.c with implicit-declaration errors.
Add the missing !NO_RANDOMIZED_API term to both guard blocks, matching
the pattern already used in test_stack.c, test_rng_fail.c and
test_alloc.c. The deterministic test_kem_expected_* vectors keep
exercising keygen/encaps/decaps under NO_RANDOMIZED_API; only the
randomized round-trip loop is compiled out.
Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>1 parent be70cad commit 867519c
1 file changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| |||
166 | 168 | | |
167 | 169 | | |
168 | 170 | | |
169 | | - | |
| 171 | + | |
170 | 172 | | |
171 | 173 | | |
172 | 174 | | |
| |||
288 | 290 | | |
289 | 291 | | |
290 | 292 | | |
291 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
292 | 296 | | |
293 | 297 | | |
294 | 298 | | |
295 | 299 | | |
296 | 300 | | |
297 | 301 | | |
298 | 302 | | |
299 | | - | |
| 303 | + | |
300 | 304 | | |
301 | 305 | | |
302 | 306 | | |
| |||
0 commit comments