From 514e39e2f5cd0f7f924f78cdad83e299de85a014 Mon Sep 17 00:00:00 2001 From: aidan garske Date: Thu, 11 Jun 2026 09:35:03 -0700 Subject: [PATCH] test: wrap PUBLIC_KEY_E comparisons in WC_NO_ERR_TRACE for ML-KEM/ML-DSA decode tests --- wolfcrypt/test/test.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index 38bfee7416..102964470d 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -52312,7 +52312,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t mlkem_test(void) priv[0] = 0xff; priv[1] |= 0x0f; ret = wc_MlKemKey_DecodePrivateKey(key, priv, testData[i][1]); - if (ret != PUBLIC_KEY_E) + if (ret != WC_NO_ERR_TRACE(PUBLIC_KEY_E)) ERROR_OUT(WC_TEST_RET_ENC_I(i), out); ret = 0; @@ -55873,7 +55873,8 @@ static wc_test_ret_t test_mldsa_decode_level(const byte* rawKey, ret = wc_MlDsaKey_SetParams(key, expectedLevel); } if (ret == 0) { - if (wc_MlDsaKey_ImportPrivRaw(key, der, rawKeySz) != PUBLIC_KEY_E) { + if (wc_MlDsaKey_ImportPrivRaw(key, der, rawKeySz) != + WC_NO_ERR_TRACE(PUBLIC_KEY_E)) { ret = WC_TEST_RET_ENC_NC; } }