diff options
| author | Fabrice Derepas <fabrice.derepas@canonical.com> | 2026-08-15 16:00:20 +0200 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2026-09-04 19:49:33 +1000 |
| commit | aacc136b895c5d365eb02c488490d1fac9ee14ac (patch) | |
| tree | bc931d6024d8591cc65bb2996077c9d9a2e443f9 /scripts/Makefile.thinlto | |
| parent | 37d550172c2d3cdb3a5ace3e6cb0625967d86349 (diff) | |
| download | linux-next-aacc136b895c5d365eb02c488490d1fac9ee14ac.tar.gz linux-next-aacc136b895c5d365eb02c488490d1fac9ee14ac.zip | |
crypto: asymmetric_keys - add KUnit tests for the PE parser
Add self-contained KUnit tests for pefile_parse_binary(), exercised
through verify_pefile_signature() -- which parses the image before any
signature check, so no keyring or real signature is needed. The cases
build small malformed PE images in memory:
- a PE declaring 0 data-directory entries: the certificate table entry
at fixed index 4 is absent and must be rejected (-ELIBBAD), not read
out of bounds;
- a PE declaring 5 entries with a zero (unsigned) certificate entry
gets past the directory bound and is rejected as unsigned (-ENODATA).
verify_pefile_signature() is not exported, so the test is built-in only
(bool, not tristate).
Signed-off-by: Fabrice Derepas <fabrice.derepas@canonical.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
