tests: Fix testsuite after the FIPS adjustments.
authorVitezslav Cizek <vcizek@suse.com>
Fri, 18 Mar 2016 16:54:36 +0000 (17:54 +0100)
committerWerner Koch <wk@gnupg.org>
Fri, 18 Mar 2016 16:54:36 +0000 (17:54 +0100)
commit9ecc2690181ba0bb44f66451a7dce2fc19965793
treef2877351c342a3ff00eecc6e9804ba5f82416a8d
parent1a02d741cacc3b57fe3d6ffebd794d53a60c9e97
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.

Signed-off-by: Vitezslav Cizek <vcizek@suse.com>
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>
tests/benchmark.c
tests/curves.c
tests/keygen.c
tests/pubkey.c
tests/random.c
tests/t-ed25519.c
tests/t-kdf.c
tests/t-mpi-point.c