@@ -17714,8 +17714,8 @@ static int test_wc_PKCS7_EncodeDecodeEnvelopedData(void)
1771417714 rsaPrivKeySz = (word32)sizeof(rsaClientKey);
1771517715 #endif
1771617716 #endif
17717- #if defined(HAVE_ECC) && (! defined(NO_AES) || (!defined(NO_SHA ) ||\
17718- !defined(NO_SHA256) || defined(WOLFSSL_SHA512) ))
17717+ #if defined(HAVE_ECC) && defined(HAVE_X963_KDF) && (!defined(NO_AES ) || \
17718+ !defined(NO_SHA) || !defined( NO_SHA256) || defined(WOLFSSL_SHA512))
1771917719 byte* eccCert = NULL;
1772017720 byte* eccPrivKey = NULL;
1772117721 word32 eccCertSz;
@@ -17793,8 +17793,8 @@ static int test_wc_PKCS7_EncodeDecodeEnvelopedData(void)
1779317793#endif /* NO_RSA */
1779417794
1779517795/* ECC */
17796- #if defined(HAVE_ECC) && (! defined(NO_AES) || (!defined(NO_SHA ) ||\
17797- !defined(NO_SHA256) || defined(WOLFSSL_SHA512) ))
17796+ #if defined(HAVE_ECC) && defined(HAVE_X963_KDF) && (!defined(NO_AES ) || \
17797+ !defined(NO_SHA) || !defined( NO_SHA256) || defined(WOLFSSL_SHA512))
1779817798
1779917799 #ifdef USE_CERT_BUFFERS_256
1780017800 ExpectNotNull(eccCert = (byte*)XMALLOC(TWOK_BUF, HEAP_HINT,
@@ -17862,7 +17862,7 @@ static int test_wc_PKCS7_EncodeDecodeEnvelopedData(void)
1786217862 #endif /* NO_AES && HAVE_AES_CBC */
1786317863
1786417864#endif /* NO_RSA */
17865- #if defined(HAVE_ECC)
17865+ #if defined(HAVE_ECC) && defined(HAVE_X963_KDF)
1786617866 #if !defined(NO_AES) && defined(HAVE_AES_CBC) && defined(HAVE_AES_KEYWRAP)
1786717867 #if !defined(NO_SHA) && defined(WOLFSSL_AES_128)
1786817868 {(byte*)input, (word32)(sizeof(input)/sizeof(char)), DATA,
@@ -18036,7 +18036,7 @@ static int test_wc_PKCS7_EncodeDecodeEnvelopedData(void)
1803618036 (word32)sizeof(decoded)), WC_NO_ERR_TRACE(BAD_FUNC_ARG));
1803718037 /* Should get a return of BAD_FUNC_ARG with structure data. Order matters.*/
1803818038#if defined(HAVE_ECC) && !defined(NO_AES) && defined(HAVE_AES_CBC) && \
18039- defined(HAVE_AES_KEYWRAP)
18039+ defined(HAVE_AES_KEYWRAP) && defined(HAVE_X963_KDF)
1804018040 /* only a failure for KARI test cases */
1804118041 if (pkcs7 != NULL) {
1804218042 tempWrd32 = pkcs7->singleCertSz;
@@ -18137,7 +18137,7 @@ static int test_wc_PKCS7_EncodeDecodeEnvelopedData(void)
1813718137 XFREE(rsaCert, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
1813818138 XFREE(rsaPrivKey, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
1813918139#endif /* NO_RSA */
18140- #ifdef HAVE_ECC
18140+ #if defined( HAVE_ECC) && defined(HAVE_X963_KDF)
1814118141 XFREE(eccCert, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
1814218142 XFREE(eccPrivKey, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
1814318143#endif /* HAVE_ECC */
@@ -18186,7 +18186,8 @@ static int test_wc_PKCS7_EncodeDecodeEnvelopedData(void)
1818618186} /* END test_wc_PKCS7_EncodeDecodeEnvelopedData() */
1818718187
1818818188
18189- #if defined(HAVE_PKCS7) && defined(HAVE_ECC) && !defined(NO_SHA256) && defined(WOLFSSL_AES_256)
18189+ #if defined(HAVE_PKCS7) && defined(HAVE_ECC) && defined(HAVE_X963_KDF) && \
18190+ !defined(NO_SHA256) && defined(WOLFSSL_AES_256)
1819018191static int wasAESKeyWrapCbCalled = 0;
1819118192static int wasAESKeyUnwrapCbCalled = 0;
1819218193
@@ -18215,7 +18216,8 @@ static int testAESKeyWrapUnwrapCb(const byte* key, word32 keySz,
1821518216static int test_wc_PKCS7_SetAESKeyWrapUnwrapCb(void)
1821618217{
1821718218 EXPECT_DECLS;
18218- #if defined(HAVE_PKCS7) && defined(HAVE_ECC) && !defined(NO_SHA256) && defined(WOLFSSL_AES_256)
18219+ #if defined(HAVE_PKCS7) && defined(HAVE_ECC) && defined(HAVE_X963_KDF) && \
18220+ !defined(NO_SHA256) && defined(WOLFSSL_AES_256)
1821918221 static const char input[] = "Test input for AES key wrapping";
1822018222 PKCS7 * pkcs7 = NULL;
1822118223 byte * eccCert = NULL;
@@ -18321,8 +18323,8 @@ static int test_wc_PKCS7_GetEnvelopedDataKariRid(void)
1832118323{
1832218324 EXPECT_DECLS;
1832318325#if defined(HAVE_PKCS7)
18324- #if defined(HAVE_ECC) && (! defined(NO_AES) || (!defined(NO_SHA ) || \
18325- !defined(NO_SHA256) || defined(WOLFSSL_SHA512) ))
18326+ #if defined(HAVE_ECC) && defined(HAVE_X963_KDF) && (!defined(NO_AES ) || \
18327+ !defined(NO_SHA) || !defined( NO_SHA256) || defined(WOLFSSL_SHA512))
1832618328 /* The kari-keyid-cms.msg generated by openssl has a 68 byte RID structure.
1832718329 * Reserve a bit more than that in case it might grow. */
1832818330 byte rid[256];
0 commit comments