1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
From 1952439e5235f7832c7ac694088ca497d1796262 Mon Sep 17 00:00:00 2001
From: Richard Hughes <richard@hughsie.com>
Date: Mon, 17 Nov 2025 11:14:50 +0000
Subject: [PATCH 3/3] Skip the PQ tests if the GnuTLS config is not malleable
Fixes https://github.com/hughsie/libjcat/issues/195
---
libjcat/jcat-self-test.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/libjcat/jcat-self-test.c b/libjcat/jcat-self-test.c
index ddccb3b..b89b67b 100644
--- a/libjcat/jcat-self-test.c
+++ b/libjcat/jcat-self-test.c
@@ -667,6 +667,10 @@ jcat_pkcs7_engine_self_signed_pq_func(gconstpointer test_data)
payload,
JCAT_SIGN_FLAG_ADD_TIMESTAMP | JCAT_SIGN_FLAG_USE_PQ,
&error);
+ if (signature == NULL && g_error_matches(error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED)) {
+ g_test_skip("ML-MDA cannot be enabled at runtime, skipping");
+ return;
+ }
g_assert_no_error(error);
g_assert_nonnull(signature);
result = jcat_engine_self_verify(engine,
@@ -674,6 +678,10 @@ jcat_pkcs7_engine_self_signed_pq_func(gconstpointer test_data)
jcat_blob_get_data(signature),
JCAT_VERIFY_FLAG_ONLY_PQ,
&error);
+ if (result == NULL && g_error_matches(error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED)) {
+ g_test_skip("ML-MDA cannot be enabled at runtime, skipping");
+ return;
+ }
g_assert_no_error(error);
g_assert_nonnull(result);
--
2.43.0
|