Home GnuPG

tests: Fix testsuite after the FIPS adjustments.
9ecc2690181bUnpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

tests: Fix testsuite after the FIPS adjustments.

* tests/benchmark.c (ecc_bench): Avoid not approved curves in FIPS.
* tests/curves.c (check_get_params): Skip Brainpool curves in FIPS.
* tests/keygen.c (check_dsa_keys): Generate 2048 and 3072 bits keys.
(check_ecc_keys): Skip Ed25519 in FIPS mode.
* tests/random.c (main): Don't switch DRBG in FIPS mode.
* tests/t-ed25519.c (main): Ed25519 isn't supported in FIPS mode.
* tests/t-kdf.c (check_openpgp): Skip vectors using md5 in FIPS.
* tests/t-mpi-point.c (context_param): Skip P-192 and Ed25519 in FIPS.
(main): Skip math tests that use P-192 and Ed25519 in FIPS.

Fix the testsuite to make it pass after the FIPS adjustmens.
This consists mostly of disabling the tests that use not approved
curves and algorithms as well as increasing the keysizes.

Additional changes by wk:

  • Removed changes already done with commit e40939b. The original patch had these chnages:
    • tests/fips186-dsa.c (main): Merely suggest a future improvement.
    • tests/pubkey.c (get_dsa_key_*new): Increase keysizes. (check_run): Skip tests with small domain in FIPS. (main): Skip Ed25519 sample key test in FIPS. Noet that get_dsa_key_fips186_with_seed_new was not changed from 1024 to 3072 but to 2048 bit.
  • Return with 77 (skip) from t-ed25519.c in FIPS mode.
  • Some code style changes.
  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
civAuthored on Mar 18 2016, 5:54 PM
wernerCommitted on Mar 18 2016, 5:54 PM
Parents
rC1a02d741cacc: tests: Add new --pss option to fipsdrv
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rC9ecc2690181b: tests: Fix testsuite after the FIPS adjustments. (authored by Vitezslav Cizek <vcizek@suse.com>).Mar 18 2016, 5:54 PM