Skip to content

Commit b8bc480

Browse files
authored
Merge pull request #10291 from JeremiahM37/test-coverage
Add negative tests for AEAD, PKCS7, PSS, DSA, DRBG, and PQ key
2 parents 2670a4f + efe98a7 commit b8bc480

14 files changed

Lines changed: 427 additions & 1 deletion

tests/api/test_aes.c

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4400,6 +4400,70 @@ int test_wc_AesGcmStream_ReinitAfterFinal(void)
44004400
return EXPECT_RESULT();
44014401
} /* END test_wc_AesGcmStream_ReinitAfterFinal */
44024402

4403+
int test_wc_AesGcmStream_BadAuthTag(void)
4404+
{
4405+
EXPECT_DECLS;
4406+
#if !defined(NO_AES) && defined(HAVE_AESGCM) && defined(HAVE_AES_DECRYPT) && \
4407+
defined(WOLFSSL_AES_128) && defined(WOLFSSL_AESGCM_STREAM)
4408+
static const byte key[AES_128_KEY_SIZE] = {
4409+
0xfe,0xff,0xe9,0x92, 0x86,0x65,0x73,0x1c,
4410+
0x6d,0x6a,0x8f,0x94, 0x67,0x30,0x83,0x08
4411+
};
4412+
static const byte iv[GCM_NONCE_MID_SZ] = {
4413+
0xca,0xfe,0xba,0xbe, 0xfa,0xce,0xdb,0xad,
4414+
0xde,0xca,0xf8,0x88
4415+
};
4416+
static const byte aad[20] = {
4417+
0xfe,0xed,0xfa,0xce, 0xde,0xad,0xbe,0xef,
4418+
0xfe,0xed,0xfa,0xce, 0xde,0xad,0xbe,0xef,
4419+
0xab,0xad,0xda,0xd2
4420+
};
4421+
static const byte plain[16] = {
4422+
0xd9,0x31,0x32,0x25, 0xf8,0x84,0x06,0xe5,
4423+
0xa5,0x59,0x09,0xc5, 0xaf,0xf5,0x26,0x9a
4424+
};
4425+
Aes enc[1];
4426+
Aes dec[1];
4427+
byte ct[sizeof(plain)];
4428+
byte pt[sizeof(plain)];
4429+
byte tag[WC_AES_BLOCK_SIZE];
4430+
byte bad_aad[sizeof(aad)];
4431+
4432+
XMEMSET(enc, 0, sizeof(Aes));
4433+
XMEMSET(dec, 0, sizeof(Aes));
4434+
XMEMSET(tag, 0, sizeof(tag));
4435+
4436+
ExpectIntEQ(wc_AesInit(enc, NULL, INVALID_DEVID), 0);
4437+
ExpectIntEQ(wc_AesGcmInit(enc, key, sizeof(key), iv, sizeof(iv)), 0);
4438+
ExpectIntEQ(wc_AesGcmEncryptUpdate(enc, ct, plain, sizeof(plain),
4439+
aad, sizeof(aad)), 0);
4440+
ExpectIntEQ(wc_AesGcmEncryptFinal(enc, tag, sizeof(tag)), 0);
4441+
wc_AesFree(enc);
4442+
4443+
tag[0] ^= 0x01;
4444+
4445+
ExpectIntEQ(wc_AesInit(dec, NULL, INVALID_DEVID), 0);
4446+
ExpectIntEQ(wc_AesGcmDecryptInit(dec, key, sizeof(key), iv, sizeof(iv)), 0);
4447+
ExpectIntEQ(wc_AesGcmDecryptUpdate(dec, pt, ct, sizeof(ct),
4448+
aad, sizeof(aad)), 0);
4449+
ExpectIntEQ(wc_AesGcmDecryptFinal(dec, tag, sizeof(tag)),
4450+
WC_NO_ERR_TRACE(AES_GCM_AUTH_E));
4451+
wc_AesFree(dec);
4452+
4453+
tag[0] ^= 0x01;
4454+
XMEMCPY(bad_aad, aad, sizeof(aad));
4455+
bad_aad[0] ^= 0x01;
4456+
ExpectIntEQ(wc_AesInit(dec, NULL, INVALID_DEVID), 0);
4457+
ExpectIntEQ(wc_AesGcmDecryptInit(dec, key, sizeof(key), iv, sizeof(iv)), 0);
4458+
ExpectIntEQ(wc_AesGcmDecryptUpdate(dec, pt, ct, sizeof(ct),
4459+
bad_aad, sizeof(bad_aad)), 0);
4460+
ExpectIntEQ(wc_AesGcmDecryptFinal(dec, tag, sizeof(tag)),
4461+
WC_NO_ERR_TRACE(AES_GCM_AUTH_E));
4462+
wc_AesFree(dec);
4463+
#endif
4464+
return EXPECT_RESULT();
4465+
}
4466+
44034467
/*******************************************************************************
44044468
* GMAC
44054469
******************************************************************************/

tests/api/test_aes.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ int test_wc_AesGcmNonStdNonce(void);
5454
int test_wc_AesGcmStream(void);
5555
int test_wc_AesGcmStream_MidStreamState(void);
5656
int test_wc_AesGcmStream_ReinitAfterFinal(void);
57+
int test_wc_AesGcmStream_BadAuthTag(void);
5758
int test_wc_AesCcmSetKey(void);
5859
int test_wc_AesCcmEncryptDecrypt(void);
5960
int test_wc_AesCcmEncryptDecrypt_InPlace(void);
@@ -151,6 +152,7 @@ int test_wc_CryptoCb_Tls13_Key_No_Zero_Without_Offload(void);
151152
TEST_DECL_GROUP("aes", test_wc_AesGcmStream), \
152153
TEST_DECL_GROUP("aes", test_wc_AesGcmStream_MidStreamState), \
153154
TEST_DECL_GROUP("aes", test_wc_AesGcmStream_ReinitAfterFinal), \
155+
TEST_DECL_GROUP("aes", test_wc_AesGcmStream_BadAuthTag), \
154156
TEST_DECL_GROUP("aes", test_wc_AesCcmSetKey), \
155157
TEST_DECL_GROUP("aes", test_wc_AesCcmEncryptDecrypt), \
156158
TEST_DECL_GROUP("aes", test_wc_AesCcmEncryptDecrypt_InPlace), \

tests/api/test_chacha20_poly1305.c

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,66 @@ int test_wc_XChaCha20Poly1305_aead(void)
284284
return EXPECT_RESULT();
285285
} /* END test_wc_XChaCha20Poly1305_aead */
286286

287+
int test_wc_XChaCha20Poly1305_BadAuthTag(void)
288+
{
289+
EXPECT_DECLS;
290+
#if defined(HAVE_POLY1305) && defined(HAVE_XCHACHA)
291+
const byte key[32] = {
292+
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
293+
0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
294+
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
295+
0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f
296+
};
297+
const byte nonce[24] = {
298+
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
299+
0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
300+
0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57
301+
};
302+
const byte plaintext[] = {
303+
0x4c, 0x61, 0x64, 0x69, 0x65, 0x73, 0x20, 0x61,
304+
0x6e, 0x64, 0x20, 0x47, 0x65, 0x6e, 0x74, 0x73
305+
};
306+
const byte aad[] = {
307+
0x50, 0x51, 0x52, 0x53, 0xc0, 0xc1, 0xc2, 0xc3
308+
};
309+
byte ct[sizeof(plaintext) + 16];
310+
byte pt[sizeof(plaintext)];
311+
byte ct_bad[sizeof(ct)];
312+
byte aad_bad[sizeof(aad)];
313+
314+
XMEMSET(ct, 0, sizeof(ct));
315+
316+
ExpectIntEQ(wc_XChaCha20Poly1305_Encrypt(ct, sizeof(ct),
317+
plaintext, sizeof(plaintext), aad, sizeof(aad),
318+
nonce, sizeof(nonce), key, sizeof(key)), 0);
319+
320+
ExpectIntEQ(wc_XChaCha20Poly1305_Decrypt(pt, sizeof(pt), ct, sizeof(ct),
321+
aad, sizeof(aad), nonce, sizeof(nonce), key, sizeof(key)), 0);
322+
323+
XMEMCPY(ct_bad, ct, sizeof(ct));
324+
ct_bad[sizeof(ct) - 1] ^= 0x01;
325+
ExpectIntEQ(wc_XChaCha20Poly1305_Decrypt(pt, sizeof(pt), ct_bad,
326+
sizeof(ct_bad), aad, sizeof(aad), nonce, sizeof(nonce),
327+
key, sizeof(key)),
328+
WC_NO_ERR_TRACE(MAC_CMP_FAILED_E));
329+
330+
XMEMCPY(ct_bad, ct, sizeof(ct));
331+
ct_bad[0] ^= 0x01;
332+
ExpectIntEQ(wc_XChaCha20Poly1305_Decrypt(pt, sizeof(pt), ct_bad,
333+
sizeof(ct_bad), aad, sizeof(aad), nonce, sizeof(nonce),
334+
key, sizeof(key)),
335+
WC_NO_ERR_TRACE(MAC_CMP_FAILED_E));
336+
337+
XMEMCPY(aad_bad, aad, sizeof(aad));
338+
aad_bad[0] ^= 0x01;
339+
ExpectIntEQ(wc_XChaCha20Poly1305_Decrypt(pt, sizeof(pt), ct, sizeof(ct),
340+
aad_bad, sizeof(aad_bad), nonce, sizeof(nonce),
341+
key, sizeof(key)),
342+
WC_NO_ERR_TRACE(MAC_CMP_FAILED_E));
343+
#endif
344+
return EXPECT_RESULT();
345+
}
346+
287347
#include <wolfssl/wolfcrypt/random.h>
288348

289349
#define MC_CIPHER_TEST_COUNT 100

tests/api/test_chacha20_poly1305.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
int test_wc_ChaCha20Poly1305_aead(void);
2828
int test_wc_XChaCha20Poly1305_aead(void);
29+
int test_wc_XChaCha20Poly1305_BadAuthTag(void);
2930
int test_wc_ChaCha20Poly1305_MonteCarlo(void);
3031
int test_wc_ChaCha20Poly1305_Stream(void);
3132
int test_wc_ChaCha20Poly1305_AeadEdgeCases(void);
@@ -38,6 +39,7 @@ int test_wc_ChaCha20Poly1305_CrossCipher(void);
3839
#define TEST_CHACHA20_POLY1305_DECLS \
3940
TEST_DECL_GROUP("chacha20-poly1305", test_wc_ChaCha20Poly1305_aead), \
4041
TEST_DECL_GROUP("xchacha20-poly1305", test_wc_XChaCha20Poly1305_aead), \
42+
TEST_DECL_GROUP("xchacha20-poly1305", test_wc_XChaCha20Poly1305_BadAuthTag), \
4143
TEST_DECL_GROUP("chacha20-poly1305", test_wc_ChaCha20Poly1305_MonteCarlo), \
4244
TEST_DECL_GROUP("chacha20-poly1305", test_wc_ChaCha20Poly1305_Stream), \
4345
TEST_DECL_GROUP("chacha20-poly1305", test_wc_ChaCha20Poly1305_AeadEdgeCases), \

tests/api/test_dsa.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,16 @@ int test_wc_DsaSignVerify(void)
117117
ExpectIntEQ(wc_DsaVerify(hash, signature, NULL, &answer), WC_NO_ERR_TRACE(BAD_FUNC_ARG));
118118
ExpectIntEQ(wc_DsaVerify(hash, signature, &key, NULL), WC_NO_ERR_TRACE(BAD_FUNC_ARG));
119119

120+
{
121+
byte badHash[WC_SHA_DIGEST_SIZE];
122+
123+
XMEMCPY(badHash, hash, sizeof(badHash));
124+
badHash[0] ^= 0x01;
125+
answer = 1;
126+
ExpectIntEQ(wc_DsaVerify(badHash, signature, &key, &answer), 0);
127+
ExpectIntEQ(answer, 0);
128+
}
129+
120130
#if !defined(HAVE_SELFTEST) && !defined(HAVE_FIPS) && defined(WOLFSSL_PUBLIC_MP)
121131
/* hard set q to 0 and test fail case */
122132
mp_free(&key.q);

tests/api/test_mlkem.c

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4034,3 +4034,56 @@ int test_wc_mlkem_decap_fo_reject(void)
40344034
return EXPECT_RESULT();
40354035
} /* END test_wc_mlkem_decap_fo_reject */
40364036

4037+
int test_wc_mlkem_decode_privkey_bad_pubhash(void)
4038+
{
4039+
EXPECT_DECLS;
4040+
#if !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST)
4041+
#if defined(WOLFSSL_HAVE_MLKEM) && \
4042+
!defined(WOLFSSL_NO_ML_KEM) && !defined(WOLFSSL_MLKEM_NO_MAKE_KEY)
4043+
MlKemKey* key = NULL;
4044+
WC_RNG rng;
4045+
byte priv[WC_ML_KEM_MAX_PRIVATE_KEY_SIZE];
4046+
word32 privLen = 0;
4047+
#ifndef WOLFSSL_NO_ML_KEM_768
4048+
const int mlkemType = WC_ML_KEM_768;
4049+
#elif !defined(WOLFSSL_NO_ML_KEM_512)
4050+
const int mlkemType = WC_ML_KEM_512;
4051+
#else
4052+
const int mlkemType = WC_ML_KEM_1024;
4053+
#endif
4054+
4055+
XMEMSET(&rng, 0, sizeof(rng));
4056+
XMEMSET(priv, 0, sizeof(priv));
4057+
4058+
key = (MlKemKey*)XMALLOC(sizeof(*key), NULL, DYNAMIC_TYPE_TMP_BUFFER);
4059+
ExpectNotNull(key);
4060+
ExpectIntEQ(wc_InitRng(&rng), 0);
4061+
4062+
ExpectIntEQ(wc_MlKemKey_Init(key, mlkemType, NULL, INVALID_DEVID), 0);
4063+
ExpectIntEQ(wc_MlKemKey_MakeKey(key, &rng), 0);
4064+
ExpectIntEQ(wc_MlKemKey_PrivateKeySize(key, &privLen), 0);
4065+
ExpectTrue(privLen > (word32)(2 * WC_ML_KEM_SYM_SZ));
4066+
ExpectIntEQ(wc_MlKemKey_EncodePrivateKey(key, priv, privLen), 0);
4067+
4068+
wc_MlKemKey_Free(key);
4069+
ExpectIntEQ(wc_MlKemKey_Init(key, mlkemType, NULL, INVALID_DEVID), 0);
4070+
ExpectIntEQ(wc_MlKemKey_DecodePrivateKey(key, priv, privLen), 0);
4071+
wc_MlKemKey_Free(key);
4072+
4073+
/* Tamper H(ek) (32 bytes before z). */
4074+
if (privLen > (word32)(2 * WC_ML_KEM_SYM_SZ)) {
4075+
priv[privLen - 2 * WC_ML_KEM_SYM_SZ] ^= 0x01;
4076+
}
4077+
4078+
ExpectIntEQ(wc_MlKemKey_Init(key, mlkemType, NULL, INVALID_DEVID), 0);
4079+
ExpectIntEQ(wc_MlKemKey_DecodePrivateKey(key, priv, privLen),
4080+
WC_NO_ERR_TRACE(MLKEM_PUB_HASH_E));
4081+
wc_MlKemKey_Free(key);
4082+
4083+
DoExpectIntEQ(wc_FreeRng(&rng), 0);
4084+
XFREE(key, NULL, DYNAMIC_TYPE_TMP_BUFFER);
4085+
#endif
4086+
#endif
4087+
return EXPECT_RESULT();
4088+
} /* END test_wc_mlkem_decode_privkey_bad_pubhash */
4089+

tests/api/test_mlkem.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@ int test_wc_mlkem_encapsulate_kats(void);
2929
int test_wc_mlkem_decapsulate_kats(void);
3030
int test_wc_mlkem_decapsulate_pubonly_fails(void);
3131
int test_wc_mlkem_decap_fo_reject(void);
32+
int test_wc_mlkem_decode_privkey_bad_pubhash(void);
3233

3334
#define TEST_MLKEM_DECLS \
3435
TEST_DECL_GROUP("mlkem", test_wc_mlkem_make_key_kats), \
3536
TEST_DECL_GROUP("mlkem", test_wc_mlkem_encapsulate_kats), \
3637
TEST_DECL_GROUP("mlkem", test_wc_mlkem_decapsulate_kats), \
3738
TEST_DECL_GROUP("mlkem", test_wc_mlkem_decapsulate_pubonly_fails), \
38-
TEST_DECL_GROUP("mlkem", test_wc_mlkem_decap_fo_reject)
39+
TEST_DECL_GROUP("mlkem", test_wc_mlkem_decap_fo_reject), \
40+
TEST_DECL_GROUP("mlkem", test_wc_mlkem_decode_privkey_bad_pubhash)
3941

4042
#endif /* WOLFCRYPT_TEST_MLKEM_H */

tests/api/test_pkcs7.c

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2326,6 +2326,54 @@ int test_wc_PKCS7_VerifySignedData_RSA(void)
23262326
return EXPECT_RESULT();
23272327
} /* END test_wc_PKCS7_VerifySignedData()_RSA */
23282328

2329+
int test_wc_PKCS7_VerifySignedData_TamperedAttribs(void)
2330+
{
2331+
EXPECT_DECLS;
2332+
#if defined(HAVE_PKCS7) && !defined(NO_FILESYSTEM) && !defined(NO_RSA)
2333+
PKCS7* pkcs7 = NULL;
2334+
byte output[6000];
2335+
word32 outputSz = sizeof(output);
2336+
byte data[] = "Test data to encode.";
2337+
/* SCEP messageType OID + SET { PrintableString "19" } */
2338+
const byte pattern[] = {
2339+
0x06, 0x0a, 0x60, 0x86, 0x48, 0x01, 0x86, 0xF8,
2340+
0x45, 0x01, 0x09, 0x02,
2341+
0x31, 0x04, 0x13, 0x02, 0x31, 0x39
2342+
};
2343+
word32 i;
2344+
int found = -1;
2345+
int matches = 0;
2346+
2347+
XMEMSET(output, 0, outputSz);
2348+
ExpectIntGT((outputSz = (word32)CreatePKCS7SignedData(output, (int)outputSz,
2349+
data, (word32)sizeof(data),
2350+
1 /* withAttribs */, 0 /* detached */, 0, RSA_TYPE)), 0);
2351+
2352+
if (outputSz > 0 && outputSz <= sizeof(output)) {
2353+
for (i = 0; i + sizeof(pattern) <= outputSz; i++) {
2354+
if (XMEMCMP(output + i, pattern, sizeof(pattern)) == 0) {
2355+
if (matches == 0)
2356+
found = (int)i;
2357+
matches++;
2358+
}
2359+
}
2360+
ExpectIntEQ(matches, 1);
2361+
}
2362+
2363+
if (matches == 1 && found >= 0) {
2364+
output[found + (int)sizeof(pattern) - 1] ^= 0x01;
2365+
2366+
ExpectNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, testDevId));
2367+
ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
2368+
ExpectIntEQ(wc_PKCS7_VerifySignedData(pkcs7, output, outputSz),
2369+
WC_NO_ERR_TRACE(SIG_VERIFY_E));
2370+
wc_PKCS7_Free(pkcs7);
2371+
pkcs7 = NULL;
2372+
}
2373+
#endif
2374+
return EXPECT_RESULT();
2375+
}
2376+
23292377
/*
23302378
* Testing wc_PKCS_VerifySignedData()
23312379
*/
@@ -2515,6 +2563,54 @@ int test_wc_PKCS7_VerifySignedData_ECC(void)
25152563
return EXPECT_RESULT();
25162564
} /* END test_wc_PKCS7_VerifySignedData_ECC() */
25172565

2566+
int test_wc_PKCS7_VerifySignedData_ECC_TamperedAttribs(void)
2567+
{
2568+
EXPECT_DECLS;
2569+
#if defined(HAVE_PKCS7) && !defined(NO_FILESYSTEM) && defined(HAVE_ECC)
2570+
PKCS7* pkcs7 = NULL;
2571+
byte output[6000];
2572+
word32 outputSz = sizeof(output);
2573+
byte data[] = "Test data to encode.";
2574+
/* SCEP messageType OID + SET { PrintableString "19" } */
2575+
const byte pattern[] = {
2576+
0x06, 0x0a, 0x60, 0x86, 0x48, 0x01, 0x86, 0xF8,
2577+
0x45, 0x01, 0x09, 0x02,
2578+
0x31, 0x04, 0x13, 0x02, 0x31, 0x39
2579+
};
2580+
word32 i;
2581+
int found = -1;
2582+
int matches = 0;
2583+
2584+
XMEMSET(output, 0, outputSz);
2585+
ExpectIntGT((outputSz = (word32)CreatePKCS7SignedData(output, (int)outputSz,
2586+
data, (word32)sizeof(data),
2587+
1 /* withAttribs */, 0 /* detached */, 0, ECC_TYPE)), 0);
2588+
2589+
if (outputSz > 0 && outputSz <= sizeof(output)) {
2590+
for (i = 0; i + sizeof(pattern) <= outputSz; i++) {
2591+
if (XMEMCMP(output + i, pattern, sizeof(pattern)) == 0) {
2592+
if (matches == 0)
2593+
found = (int)i;
2594+
matches++;
2595+
}
2596+
}
2597+
ExpectIntEQ(matches, 1);
2598+
}
2599+
2600+
if (matches == 1 && found >= 0) {
2601+
output[found + (int)sizeof(pattern) - 1] ^= 0x01;
2602+
2603+
ExpectNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, testDevId));
2604+
ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
2605+
ExpectIntEQ(wc_PKCS7_VerifySignedData(pkcs7, output, outputSz),
2606+
WC_NO_ERR_TRACE(SIG_VERIFY_E));
2607+
wc_PKCS7_Free(pkcs7);
2608+
pkcs7 = NULL;
2609+
}
2610+
#endif
2611+
return EXPECT_RESULT();
2612+
}
2613+
25182614

25192615
#if defined(HAVE_PKCS7) && !defined(NO_AES) && defined(HAVE_AES_CBC) && \
25202616
defined(WOLFSSL_AES_256) && defined(HAVE_AES_KEYWRAP)

tests/api/test_pkcs7.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ int test_wc_PKCS7_EnvelopedData_KTRI_BadRsaPad(void);
4848
#endif
4949
int test_wc_PKCS7_EncodeSignedData_ex(void);
5050
int test_wc_PKCS7_VerifySignedData_RSA(void);
51+
int test_wc_PKCS7_VerifySignedData_TamperedAttribs(void);
5152
int test_wc_PKCS7_VerifySignedData_ECC(void);
53+
int test_wc_PKCS7_VerifySignedData_ECC_TamperedAttribs(void);
5254
int test_wc_PKCS7_DecodeEnvelopedData_stream(void);
5355
int test_wc_PKCS7_EncodeDecodeEnvelopedData(void);
5456
int test_wc_PKCS7_SetAESKeyWrapUnwrapCb(void);
@@ -112,7 +114,9 @@ int test_wc_PKCS7_VerifySignedData_TruncCertSetTag(void);
112114
TEST_PKCS7_RSA_PSS_SD_DECL \
113115
TEST_DECL_GROUP("pkcs7_sd", test_wc_PKCS7_EncodeSignedData_ex), \
114116
TEST_DECL_GROUP("pkcs7_sd", test_wc_PKCS7_VerifySignedData_RSA), \
117+
TEST_DECL_GROUP("pkcs7_sd", test_wc_PKCS7_VerifySignedData_TamperedAttribs), \
115118
TEST_DECL_GROUP("pkcs7_sd", test_wc_PKCS7_VerifySignedData_ECC), \
119+
TEST_DECL_GROUP("pkcs7_sd", test_wc_PKCS7_VerifySignedData_ECC_TamperedAttribs), \
116120
TEST_DECL_GROUP("pkcs7_sd", test_wc_PKCS7_Degenerate), \
117121
TEST_DECL_GROUP("pkcs7_sd", test_wc_PKCS7_BER), \
118122
TEST_DECL_GROUP("pkcs7_sd", test_wc_PKCS7_NoDefaultSignedAttribs), \

0 commit comments

Comments
 (0)