Skip to content

Commit

Permalink
initialize test variables and fix async build
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobBarthelmeh committed Feb 28, 2025
1 parent ea9f044 commit 6020bf2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tests/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -39241,10 +39241,10 @@ static int test_wc_PKCS7_DecodeEnvelopedData_stream(void)
EXPECT_DECLS;
PKCS7* pkcs7 = NULL;
int ret;
FILE* f;
FILE* f = NULL;
const char* testStream = "./certs/test-stream-dec.p7b";
byte testStreamBuffer[100];
int testStreamBufferSz;
int testStreamBufferSz = 0;
byte decodedData[MAX_TEST_DECODE_SIZE]; /* large enough to hold result of decode, which is ca-cert.pem */
WOLFSSL_BUFFER_INFO out;

Expand Down
6 changes: 3 additions & 3 deletions wolfcrypt/src/pkcs7.c
Original file line number Diff line number Diff line change
Expand Up @@ -8618,7 +8618,7 @@ static int wc_PKCS7_DecryptContentEx(PKCS7* pkcs7, int encryptOID,
(word32)inSz);
#ifdef WOLFSSL_ASYNC_CRYPT
/* async decrypt not available here, so block till done */
ret = wc_AsyncWait(ret, &aes->asyncDev, WC_ASYNC_FLAG_NONE);
ret = wc_AsyncWait(ret, &pkcs7->decryptKey.aes->asyncDev, WC_ASYNC_FLAG_NONE);
#endif
break;
#endif /* HAVE_AES_CBC */
Expand Down Expand Up @@ -8681,7 +8681,7 @@ static int wc_PKCS7_DecryptContentEx(PKCS7* pkcs7, int encryptOID,
#ifdef WOLFSSL_ASYNC_CRYPT
/* async decrypt not available here, so block till done */
ret = wc_AsyncWait(ret,
&pkcs7->decryptKey.des3.asyncDev, WC_ASYNC_FLAG_NONE);
&pkcs7->decryptKey.des3->asyncDev, WC_ASYNC_FLAG_NONE);
#endif
break;
#endif /* !NO_DES3 */
Expand Down Expand Up @@ -13781,7 +13781,7 @@ WOLFSSL_API int wc_PKCS7_DecodeAuthEnvelopedData(wc_PKCS7* pkcs7, byte* in,
* IMPLICIT [1] tag in the authAttrs field is not used for the
* DER encoding: rather a universal SET OF tag is used. */
(void)SetSet(length, pkcs7->stream->aad); /* ignoring the size returned,
* we know it is idx - encodedAttribIdx from parsing whats given */
* we know it is idx - encodedAttribIdx from parsing what's given */
}
}

Expand Down

0 comments on commit 6020bf2

Please sign in to comment.