Home GnuPG

fips: Improve selftests invocation.

Description

fips: Improve selftests invocation.

* src/fips.c (run_digest_selftests): Skip SHA256 selftest if they were
already executed as part of the integrity check.
(run_mac_selftests): Skip HMAC-SHA256 selftest if they were already
executed as part of the integrity check.
(run_hmac_sha256_selftests): Run SHA256 selftest too.
(_gcry_fips_run_selftests): Run the sha256 selftests regardless of the
fips mode status.

Prevent running the SHA256 tests twice and runs the SHA256 test
before the HMAC-SHA256 also from when manually invoked.

  • GnuPG-bug-id: T5617
  • Signed-off-by: Jakub Jelen <jjelen@redhat.com>

Details

Provenance
JakujeAuthored on Oct 14 2021, 5:58 PM
gniibeCommitted on Oct 15 2021, 4:33 AM
Parents
rCb496868dc37d: fips: Fix the previous commit.
Branches
Unknown
Tags
Unknown
Tasks
T5617: fips: Check library integrity before running selftests