mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-01-29 10:20:07 +01:00
account for no AES build and add err trace macro
This commit is contained in:
@@ -2182,7 +2182,11 @@ int test_wc_PKCS7_DecodeEnvelopedData_multiple_recipients(void)
|
||||
|
||||
ret = wc_PKCS7_DecodeEnvelopedData(pkcs7, testDerBuffer,
|
||||
(word32)testDerBufferSz, decodedData, sizeof(decodedData));
|
||||
#if defined(NO_AES) || defined(NO_AES_256)
|
||||
ExpectIntEQ(ret, ALGO_ID_E);
|
||||
#else
|
||||
ExpectIntGT(ret, 0);
|
||||
#endif
|
||||
wc_PKCS7_Free(pkcs7);
|
||||
}
|
||||
|
||||
@@ -2197,7 +2201,11 @@ int test_wc_PKCS7_DecodeEnvelopedData_multiple_recipients(void)
|
||||
|
||||
ret = wc_PKCS7_DecodeEnvelopedData(pkcs7, testDerBuffer,
|
||||
(word32)testDerBufferSz, decodedData, sizeof(decodedData));
|
||||
#if defined(NO_AES) || defined(NO_AES_256)
|
||||
ExpectIntEQ(ret, ALGO_ID_E);
|
||||
#else
|
||||
ExpectIntGT(ret, 0);
|
||||
#endif
|
||||
wc_PKCS7_Free(pkcs7);
|
||||
}
|
||||
|
||||
|
||||
@@ -11975,7 +11975,8 @@ static int wc_PKCS7_DecryptRecipientInfos(wc_PKCS7* pkcs7, byte* in,
|
||||
decryptedKey, decryptedKeySz,
|
||||
recipFound);
|
||||
if (ret != 0) {
|
||||
if (ret != WC_PKCS7_WANT_READ_E && *recipFound == 0) {
|
||||
if (ret != WC_NO_ERR_TRACE(WC_PKCS7_WANT_READ_E) &&
|
||||
*recipFound == 0) {
|
||||
continue; /* try next recipient */
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user