File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -18313,6 +18313,8 @@ static int test_wc_PKCS7_GetEnvelopedDataKariRid(void)
1831318313#if defined(HAVE_PKCS7)
1831418314#if defined(HAVE_ECC) && (!defined(NO_AES) || (!defined(NO_SHA) || \
1831518315 !defined(NO_SHA256) || defined(WOLFSSL_SHA512)))
18316+ /* The kari-keyid-cms.msg generated by openssl has a 68 byte RID structure.
18317+ * Reserve a bit more than that in case it might grow. */
1831618318 byte rid[256];
1831718319 byte cms[1024];
1831818320 XFILE cmsFile = XBADFILE;
@@ -18342,6 +18344,7 @@ static int test_wc_PKCS7_GetEnvelopedDataKariRid(void)
1834218344 ret = wc_PKCS7_GetEnvelopedDataKariRid(cms, cmsSz, rid, &ridSz);
1834318345 }
1834418346 ExpectIntEQ(ret, 0);
18347+ ExpectIntLT(ridSz, sizeof(rid));
1834518348 ExpectIntGT(ridSz, ridKeyIdentifierOffset);
1834618349 /* The Subject Key Identifier hex file should have 2 hex characters for each
1834718350 * byte of the key identifier in the returned recipient ID (rid), plus a
You can’t perform that action at this time.
0 commit comments