tests: Fixes for RSA testsuite in FIPS mode
authorVitezslav Cizek <vcizek@suse.com>
Fri, 30 Oct 2015 14:38:13 +0000 (15:38 +0100)
committerWerner Koch <wk@gnupg.org>
Fri, 18 Mar 2016 15:19:06 +0000 (16:19 +0100)
commitc690230af5a66b809f8f6fbab1a6262a5ba078cb
tree54f0767ef1ec226cb7fa55755c81d88cbab11fc3
parent78cec8b4754fdf774edb2d575000cb3e972e244c
tests: Fixes for RSA testsuite in FIPS mode

* tests/basic.c (get_keys_new): Generate 2048 bit key.
* tests/benchmark.c (rsa_bench): Skip keys of lengths different
than 2048 and 3072 in FIPS mode.
* tests/keygen.c (check_rsa_keys): Failure if short keys can be
generated in FIPS mode.
(check_dsa_keys): Ditto for DSA keys.
* tests/pubkey.c (check_x931_derived_key): Skip keys < 2048 in FIPS.
--

Thanks to Ludwig Nussel.
Signed-off-by: Vitezslav Cizek <vcizek@suse.com>
Additional changes by wk:
  - Remove printing of "FAIL" in fail() because this is reserved for
    use by the test driver of the Makefile.
  - Move setting of IN_FIPS_MODE after gcry_check_version in keygen.c

Signed-off-by: Werner Koch <wk@gnupg.org>
tests/basic.c
tests/benchmark.c
tests/keygen.c
tests/pubkey.c