Commit 528898a976 for strongswan.org
commit 528898a976b4a6591968fadb4644712c922ac3fa
Author: Tobias Brunner <tobias@strongswan.org>
Date: Mon Jun 29 17:42:28 2026 +0200
unit-tests: Allow Ed448 implementations to fail parsing small-order public keys
We already adapted the Ed25519 test with 36b1a6d76c1b ("Use Botan 3.1.1
for tests"), now wolfSSL refuses to create such Ed448 keys as well.
diff --git a/src/libstrongswan/tests/suites/test_ed448.c b/src/libstrongswan/tests/suites/test_ed448.c
index 1844cc8904..dd045a3b43 100644
--- a/src/libstrongswan/tests/suites/test_ed448.c
+++ b/src/libstrongswan/tests/suites/test_ed448.c
@@ -621,10 +621,12 @@ START_TEST(test_ed448_fail)
pubkey->destroy(pubkey);
pubkey = lib->creds->create(lib->creds, CRED_PUBLIC_KEY, KEY_ED448,
BUILD_BLOB_ASN1_DER, zero_pk, BUILD_END);
- ck_assert(pubkey != NULL);
- ck_assert(!pubkey->verify(pubkey, SIGN_ED448, NULL, sig_tests[0].msg,
- sig));
- pubkey->destroy(pubkey);
+ if (pubkey)
+ {
+ ck_assert(!pubkey->verify(pubkey, SIGN_ED448, NULL, sig_tests[0].msg,
+ sig));
+ pubkey->destroy(pubkey);
+ }
}
END_TEST