mirror of https://github.com/wolfSSL/wolfssl.git
initialize test variables and fix async build
parent
ea9f044bcc
commit
6020bf2368
|
@ -39241,10 +39241,10 @@ static int test_wc_PKCS7_DecodeEnvelopedData_stream(void)
|
||||||
EXPECT_DECLS;
|
EXPECT_DECLS;
|
||||||
PKCS7* pkcs7 = NULL;
|
PKCS7* pkcs7 = NULL;
|
||||||
int ret;
|
int ret;
|
||||||
FILE* f;
|
FILE* f = NULL;
|
||||||
const char* testStream = "./certs/test-stream-dec.p7b";
|
const char* testStream = "./certs/test-stream-dec.p7b";
|
||||||
byte testStreamBuffer[100];
|
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 */
|
byte decodedData[MAX_TEST_DECODE_SIZE]; /* large enough to hold result of decode, which is ca-cert.pem */
|
||||||
WOLFSSL_BUFFER_INFO out;
|
WOLFSSL_BUFFER_INFO out;
|
||||||
|
|
||||||
|
|
|
@ -8618,7 +8618,7 @@ static int wc_PKCS7_DecryptContentEx(PKCS7* pkcs7, int encryptOID,
|
||||||
(word32)inSz);
|
(word32)inSz);
|
||||||
#ifdef WOLFSSL_ASYNC_CRYPT
|
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||||
/* async decrypt not available here, so block till done */
|
/* 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
|
#endif
|
||||||
break;
|
break;
|
||||||
#endif /* HAVE_AES_CBC */
|
#endif /* HAVE_AES_CBC */
|
||||||
|
@ -8681,7 +8681,7 @@ static int wc_PKCS7_DecryptContentEx(PKCS7* pkcs7, int encryptOID,
|
||||||
#ifdef WOLFSSL_ASYNC_CRYPT
|
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||||
/* async decrypt not available here, so block till done */
|
/* async decrypt not available here, so block till done */
|
||||||
ret = wc_AsyncWait(ret,
|
ret = wc_AsyncWait(ret,
|
||||||
&pkcs7->decryptKey.des3.asyncDev, WC_ASYNC_FLAG_NONE);
|
&pkcs7->decryptKey.des3->asyncDev, WC_ASYNC_FLAG_NONE);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
#endif /* !NO_DES3 */
|
#endif /* !NO_DES3 */
|
||||||
|
@ -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
|
* IMPLICIT [1] tag in the authAttrs field is not used for the
|
||||||
* DER encoding: rather a universal SET OF tag is used. */
|
* DER encoding: rather a universal SET OF tag is used. */
|
||||||
(void)SetSet(length, pkcs7->stream->aad); /* ignoring the size returned,
|
(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 */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue