Skip to content

Commit 91f66fb

Browse files
committed
tests/api/test_pkcs7.c: in test_wc_PKCS7_BER(), in expected-failure wc_PKCS7_DecodeEnvelopedData() in WOLFSSL_SP_MATH build, allow failure with either WC_KEY_SIZE_E or BUFFER_E, to accommodate blinding added by wolfSSL#10128 / 589feab.
1 parent 1f1b572 commit 91f66fb

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

tests/api/test_pkcs7.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4577,8 +4577,12 @@ int test_wc_PKCS7_BER(void)
45774577
}
45784578
#ifndef NO_RSA
45794579
#ifdef WOLFSSL_SP_MATH
4580-
ExpectIntEQ(wc_PKCS7_DecodeEnvelopedData(pkcs7, berContent,
4581-
sizeof(berContent), decoded, sizeof(decoded)), WC_NO_ERR_TRACE(WC_KEY_SIZE_E));
4580+
if (EXPECT_SUCCESS()) {
4581+
ret = wc_PKCS7_DecodeEnvelopedData(
4582+
pkcs7, berContent, sizeof(berContent), decoded, sizeof(decoded));
4583+
ExpectTrue((ret == WC_NO_ERR_TRACE(WC_KEY_SIZE_E)) ||
4584+
(ret == WC_NO_ERR_TRACE(BUFFER_E)));
4585+
}
45824586
#else
45834587
ExpectIntGT(wc_PKCS7_DecodeEnvelopedData(pkcs7, berContent,
45844588
sizeof(berContent), decoded, sizeof(decoded)), 0);

0 commit comments

Comments
 (0)