summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClemens Lang <cllang@redhat.com>2022-06-21 19:00:48 +0200
committerNIIBE Yutaka <gniibe@fsij.org>2022-07-01 16:12:16 +0900
commitc5480b4934bb0adecdfc29a47b5e123f995507e1 (patch)
tree699f6973fd4fc173e78714b7b0c9021b52f0e418
parent56000fb5c42f01f1ced4e3dd0bb30662c0ba87c3 (diff)
downloadlibgcrypt-c5480b4934bb0adecdfc29a47b5e123f995507e1.tar.gz
fips: Skip selftests of unsupported PK algos
* src/fips.c (run_pubkey_selftests): Do not run selftests for disabled public key algorithms. -- Skip running FIPS selftests that are specific for a public key algorithm if that algorithm was disabled using the --enable-pubkey-ciphers configure option. GnuPG-bug-id: 6048 Signed-off-by: Clemens Lang <cllang@redhat.com>
-rw-r--r--src/fips.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/fips.c b/src/fips.c
index 89f8204b..a1958b14 100644
--- a/src/fips.c
+++ b/src/fips.c
@@ -554,8 +554,12 @@ run_pubkey_selftests (int extended)
{
static int algos[] =
{
+#if USE_RSA
GCRY_PK_RSA,
+#endif /* USE_RSA */
+#if USE_ECC
GCRY_PK_ECC,
+#endif /* USE_ECC */
0
};
int idx;