mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 12:14:38 +02:00
PKCS7/CMS build fixes when disabling individual AES sizes
This commit is contained in:
committed by
David Garske
parent
4d9375b862
commit
9bef9bad8e
24
tests/api.c
24
tests/api.c
@@ -15642,28 +15642,34 @@ static void test_wc_PKCS7_EncodeDecodeEnvelopedData (void)
|
|||||||
rsaCert, rsaCertSz, rsaPrivKey, rsaPrivKeySz},
|
rsaCert, rsaCertSz, rsaPrivKey, rsaPrivKeySz},
|
||||||
#endif /* NO_DES3 */
|
#endif /* NO_DES3 */
|
||||||
#ifndef NO_AES
|
#ifndef NO_AES
|
||||||
|
#ifndef NO_AES_128
|
||||||
{(byte*)input, (word32)(sizeof(input)/sizeof(char)), DATA, AES128CBCb,
|
{(byte*)input, (word32)(sizeof(input)/sizeof(char)), DATA, AES128CBCb,
|
||||||
0, 0, rsaCert, rsaCertSz, rsaPrivKey, rsaPrivKeySz},
|
0, 0, rsaCert, rsaCertSz, rsaPrivKey, rsaPrivKeySz},
|
||||||
|
#endif
|
||||||
|
#ifndef NO_AES_192
|
||||||
{(byte*)input, (word32)(sizeof(input)/sizeof(char)), DATA, AES192CBCb,
|
{(byte*)input, (word32)(sizeof(input)/sizeof(char)), DATA, AES192CBCb,
|
||||||
0, 0, rsaCert, rsaCertSz, rsaPrivKey, rsaPrivKeySz},
|
0, 0, rsaCert, rsaCertSz, rsaPrivKey, rsaPrivKeySz},
|
||||||
|
#endif
|
||||||
|
#ifndef NO_AES_256
|
||||||
{(byte*)input, (word32)(sizeof(input)/sizeof(char)), DATA, AES256CBCb,
|
{(byte*)input, (word32)(sizeof(input)/sizeof(char)), DATA, AES256CBCb,
|
||||||
0, 0, rsaCert, rsaCertSz, rsaPrivKey, rsaPrivKeySz},
|
0, 0, rsaCert, rsaCertSz, rsaPrivKey, rsaPrivKeySz},
|
||||||
|
#endif
|
||||||
#endif /* NO_AES */
|
#endif /* NO_AES */
|
||||||
|
|
||||||
#endif /* NO_RSA */
|
#endif /* NO_RSA */
|
||||||
#if defined(HAVE_ECC)
|
#if defined(HAVE_ECC)
|
||||||
#ifndef NO_AES
|
#ifndef NO_AES
|
||||||
#ifndef NO_SHA
|
#if !defined(NO_SHA) && !defined(NO_AES_128)
|
||||||
{(byte*)input, (word32)(sizeof(input)/sizeof(char)), DATA, AES128CBCb,
|
{(byte*)input, (word32)(sizeof(input)/sizeof(char)), DATA, AES128CBCb,
|
||||||
AES128_WRAP, dhSinglePass_stdDH_sha1kdf_scheme, eccCert,
|
AES128_WRAP, dhSinglePass_stdDH_sha1kdf_scheme, eccCert,
|
||||||
eccCertSz, eccPrivKey, eccPrivKeySz},
|
eccCertSz, eccPrivKey, eccPrivKeySz},
|
||||||
#endif
|
#endif
|
||||||
#ifndef NO_SHA256
|
#if !defined(NO_SHA256) && !defined(NO_AES_256)
|
||||||
{(byte*)input, (word32)(sizeof(input)/sizeof(char)), DATA, AES256CBCb,
|
{(byte*)input, (word32)(sizeof(input)/sizeof(char)), DATA, AES256CBCb,
|
||||||
AES256_WRAP, dhSinglePass_stdDH_sha256kdf_scheme, eccCert,
|
AES256_WRAP, dhSinglePass_stdDH_sha256kdf_scheme, eccCert,
|
||||||
eccCertSz, eccPrivKey, eccPrivKeySz},
|
eccCertSz, eccPrivKey, eccPrivKeySz},
|
||||||
#endif
|
#endif
|
||||||
#ifdef WOLFSSL_SHA512
|
#if !defined(WOLFSSL_SHA512) && !defined(NO_AES_256)
|
||||||
{(byte*)input, (word32)(sizeof(input)/sizeof(char)), DATA, AES256CBCb,
|
{(byte*)input, (word32)(sizeof(input)/sizeof(char)), DATA, AES256CBCb,
|
||||||
AES256_WRAP, dhSinglePass_stdDH_sha512kdf_scheme, eccCert,
|
AES256_WRAP, dhSinglePass_stdDH_sha512kdf_scheme, eccCert,
|
||||||
eccCertSz, eccPrivKey, eccPrivKeySz},
|
eccCertSz, eccPrivKey, eccPrivKeySz},
|
||||||
@@ -15807,15 +15813,20 @@ static void test_wc_PKCS7_EncodeEncryptedData (void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NO_AES
|
#ifndef NO_AES
|
||||||
|
#ifndef NO_AES_128
|
||||||
byte aes128Key[] = {
|
byte aes128Key[] = {
|
||||||
0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,
|
0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,
|
||||||
0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08
|
0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
#ifndef NO_AES_192
|
||||||
byte aes192Key[] = {
|
byte aes192Key[] = {
|
||||||
0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,
|
0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,
|
||||||
0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,
|
0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,
|
||||||
0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08
|
0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
#ifndef NO_AES_256
|
||||||
byte aes256Key[] = {
|
byte aes256Key[] = {
|
||||||
0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,
|
0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,
|
||||||
0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,
|
0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,
|
||||||
@@ -15823,6 +15834,7 @@ static void test_wc_PKCS7_EncodeEncryptedData (void)
|
|||||||
0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08
|
0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
const pkcs7EncryptedVector testVectors[] =
|
const pkcs7EncryptedVector testVectors[] =
|
||||||
{
|
{
|
||||||
#ifndef NO_DES3
|
#ifndef NO_DES3
|
||||||
@@ -15831,14 +15843,20 @@ static void test_wc_PKCS7_EncodeEncryptedData (void)
|
|||||||
{data, (word32)sizeof(data), DATA, DESb, desKey, sizeof(desKey)},
|
{data, (word32)sizeof(data), DATA, DESb, desKey, sizeof(desKey)},
|
||||||
#endif /* NO_DES3 */
|
#endif /* NO_DES3 */
|
||||||
#ifndef NO_AES
|
#ifndef NO_AES
|
||||||
|
#ifndef NO_AES_128
|
||||||
{data, (word32)sizeof(data), DATA, AES128CBCb, aes128Key,
|
{data, (word32)sizeof(data), DATA, AES128CBCb, aes128Key,
|
||||||
sizeof(aes128Key)},
|
sizeof(aes128Key)},
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NO_AES_192
|
||||||
{data, (word32)sizeof(data), DATA, AES192CBCb, aes192Key,
|
{data, (word32)sizeof(data), DATA, AES192CBCb, aes192Key,
|
||||||
sizeof(aes192Key)},
|
sizeof(aes192Key)},
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NO_AES_256
|
||||||
{data, (word32)sizeof(data), DATA, AES256CBCb, aes256Key,
|
{data, (word32)sizeof(data), DATA, AES256CBCb, aes256Key,
|
||||||
sizeof(aes256Key)},
|
sizeof(aes256Key)},
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* NO_AES */
|
#endif /* NO_AES */
|
||||||
};
|
};
|
||||||
|
@@ -19211,7 +19211,7 @@ static int pkcs7enveloped_run_vectors(byte* rsaCert, word32 rsaCertSz,
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NO_AES
|
#if !defined(NO_AES) && !defined(NO_AES_128)
|
||||||
/* ori (OtherRecipientInfo) recipient types */
|
/* ori (OtherRecipientInfo) recipient types */
|
||||||
{data, (word32)sizeof(data), DATA, AES128CBCb, 0, 0, NULL, 0, NULL, 0,
|
{data, (word32)sizeof(data), DATA, AES128CBCb, 0, 0, NULL, 0, NULL, 0,
|
||||||
NULL, 0, 0, 0, NULL, 0, NULL, 0, NULL, NULL, 0, NULL, 0, 0, NULL, 0,
|
NULL, 0, 0, 0, NULL, 0, NULL, 0, NULL, NULL, 0, NULL, 0, 0, NULL, 0,
|
||||||
|
Reference in New Issue
Block a user