Skip to content

Commit 357b624

Browse files
authored
Merge pull request #9024 from JacobBarthelmeh/mldsa
fix mldsa test case for buffer size and expire date
2 parents b0fd029 + 98c70fb commit 357b624

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/api/test_mldsa.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16820,7 +16820,10 @@ int test_mldsa_pkcs12(void)
1682016820
const word32 inKeyMaxSz = inKeyHeaderSz + DILITHIUM_MAX_PRV_KEY_SIZE;
1682116821
const word32 certConstSz = 412;
1682216822
const word32 inCertMaxSz =
16823-
certConstSz + DILITHIUM_MAX_SIG_SIZE + DILITHIUM_MAX_PUB_KEY_SIZE;
16823+
certConstSz + DILITHIUM_MAX_PUB_KEY_SIZE +
16824+
WOLFSSL_ASN_MAX_LENGTH_SZ + DILITHIUM_MAX_SIG_SIZE;
16825+
/* max signature size + ASN1 encoding */
16826+
1682416827
const word32 pkcs8HeaderSz = 24;
1682516828
WC_RNG rng;
1682616829
dilithium_key mldsa_key;
@@ -16913,7 +16916,7 @@ int test_mldsa_pkcs12(void)
1691316916
XSTRNCPY((char*)cert.beforeDate, "\x18\x0f""20250101000000Z",
1691416917
CTC_DATE_SIZE);
1691516918
cert.beforeDateSz = 17;
16916-
XSTRNCPY((char*)cert.afterDate, "\x18\x0f""20493112115959Z",
16919+
XSTRNCPY((char*)cert.afterDate, "\x18\x0f""20491231115959Z",
1691716920
CTC_DATE_SIZE);
1691816921
cert.afterDateSz = 17;
1691916922
cert.selfSigned = 1;

0 commit comments

Comments
 (0)