Home GnuPG

Adjust tests for proper disablement of non-approve PK operations

Description

Adjust tests for proper disablement of non-approve PK operations

* cipher/pubkey.c (_gcry_pk_genkey): Do not allow key generation of
  disabled key types
* tests/benchmark.c (elg_bench): Skip Elgamal keys benchmark in FIPS
  mode
  (dsa_bench): Skip DSA keys benchmarking in FIPS mode
* tests/dsa-rfc6979.c (check_dsa_rfc6979): DSA keys are no longer
  allowed in FIPS mode
* tests/fips186-dsa.c (global): Use global in_fips_mode flag
  (check_dsa_gen_186_2): Expect DSA keygen fail in FIPS mode
  (check_dsa_gen_186_3): Ditto.
  (main): Use global fips mode flag.
* tests/keygen.c (check_elg_keys): Verify Elgamal keys can not be
  generated in FIPS mode
  (check_dsa_keys): Verify DSA keys can not be generated in FIPS mode.
* tests/pubkey.c (get_elg_key_new): Expect key generation to fail in
  FIPS mode
  (get_dsa_key_new): Expect DSA key generation to fail in FIPS mode
  (get_dsa_key_fips186_new): Ditto.
  (get_dsa_key_with_domain_new): Ditto.
  (get_dsa_key_fips186_with_seed_new): Ditto.
  (check_run): Do not try the Elgamal and DSA key operations in FIPS
  mode.
* tests/t-dsa.c (one_test_sexp): Skip the DSA tests in FIPS mode.
  • Signed-off-by: Jakub Jelen <jjelen@redhat.com>

Details

Provenance
JakujeAuthored on Dec 8 2021, 12:32 PM
gniibeCommitted on Dec 9 2021, 1:31 AM
Parents
rCa0a2b6796f58: tests: Add tests for gcry_pk_hash_sign/verify API.
Branches
Unknown
Tags
Unknown