[PATCH] tests/basic: Skip non-FIPS tests in FIPS mode

Clemens Lang cllang at redhat.com
Tue Jul 5 17:31:11 CEST 2022


* tests/basic.c (check_pubkey): Skip non-FIPS tests in FIPS mode, fixes
  a logic error previously introduced in e9698002.

--

e96980022e5ec079c9d4e3492eb6a1131c68e0f2 did change the behavior of
tests/basic.c to actually run non-FIPS tests in FIPS mode because the
'continue' statement was moved into the else block.

This fails when libgcrypt is configured, for example, without support
for RSA.

GnuPG-bug-id: 6048
Signed-off-by: Clemens Lang <cllang at redhat.com>
---
 tests/basic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/basic.c b/tests/basic.c
index ecbe58c2..3cf5ee2f 100644
--- a/tests/basic.c
+++ b/tests/basic.c
@@ -17098,8 +17098,8 @@ check_pubkey (void)
             else
               {
                 show_pk_not_available (pubkeys[i].id);
-                continue;
               }
+            continue;
           }
         check_one_pubkey (i, pubkeys[i]);
       }
-- 
2.35.3




More information about the Gcrypt-devel mailing list