Home GnuPG

fips: Skip PCT if RSA keygen test-parms specified

Description

fips: Skip PCT if RSA keygen test-parms specified

* cipher/rsa.c (rsa_generate): Skip PCT is test-parms were specified.
* tests/t-rsa-testparm.c: Add test for this functionality
* tests/Makefile.am: Add test to build system

ACVP testing uses the test-parms option to specify p and q to be checked
for primality. When test-parms is specified, generate_fips() always
returns keys with p=q=0. These keys then fail the pairwise consistency
test, because they cannot be used to successfully sign a message and
verify the signature.

Skip the PCT when test-parms is specified.

Add a regression test to check that this functionality continues to work
in the future.

  • Signed-off-by: Clemens Lang <cllang@redhat.com>

Details

Provenance
neverpanicAuthored on Sep 21 2022, 1:12 PM
gniibeCommitted on Sep 22 2022, 6:24 AM
Parents
rC82226dad7ae0: More clean up.
Branches
Unknown
Tags
Unknown