]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
sslapitest: include hybrid KEM tests with FIPS
authorPauli <ppzgs1@gmail.com>
Tue, 11 Feb 2025 23:14:08 +0000 (10:14 +1100)
committerTomas Mraz <tomas@openssl.org>
Fri, 14 Feb 2025 16:08:42 +0000 (17:08 +0100)
Co-Authored-By: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26714)

test/sslapitest.c

index 26b87fcbf3c9f0595503e3933aa7ea2e2da3ea95..22d1523d00cb51e3a2d66774212cbc003f611480 100644 (file)
@@ -5064,19 +5064,11 @@ static int test_key_exchange(int idx)
             kexch_name0 = "MLKEM512";
             break;
         case 13:
-            if (is_fips) {
-                testresult = 1;
-                goto end;
-            };
             kexch_groups = NULL;
             kexch_name0 = "MLKEM512";
             kexch_names = kexch_name0;
             break;
         case 14:
-            if (is_fips) {
-                testresult = 1;
-                goto end;
-            };
             kexch_groups = NULL;
             kexch_name0 = "MLKEM768";
             kexch_names = kexch_name0;
@@ -5111,11 +5103,9 @@ static int test_key_exchange(int idx)
             return 1;
     }
 
-    /* ML-KEM not yet supported in the FIPS module */
-    if (is_fips && idx >= 12 && idx <= 19) {
-        testresult = 1;
-        goto end;
-    };
+    if (is_fips && fips_provider_version_lt(libctx, 3, 5, 0)
+            && idx >= 12 && idx <= 19)
+        return TEST_skip("ML-KEM not supported in this version of fips provider");
 
     if (!TEST_true(create_ssl_ctx_pair(libctx, TLS_server_method(),
                                        TLS_client_method(), TLS1_VERSION,