mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 20:24:39 +02:00
Make unit test more resilient to earlier errors
This commit is contained in:
@@ -18338,13 +18338,16 @@ static int test_wc_PKCS7_GetEnvelopedDataKariRid(void)
|
||||
if (skiHexFile != XBADFILE)
|
||||
XFCLOSE(skiHexFile);
|
||||
|
||||
if (EXPECT_SUCCESS()) {
|
||||
ret = wc_PKCS7_GetEnvelopedDataKariRid(cms, cmsSz, rid, &ridSz);
|
||||
}
|
||||
ExpectIntEQ(ret, 0);
|
||||
ExpectIntGT(ridSz, ridKeyIdentifierOffset);
|
||||
/* The Subject Key Identifier hex file should have 2 hex characters for each
|
||||
* byte of the key identifier in the returned recipient ID (rid), plus a
|
||||
* terminating new line character. */
|
||||
ExpectIntGE(skiHexSz, ((ridSz - ridKeyIdentifierOffset) * 2) + 1);
|
||||
if (EXPECT_SUCCESS()) {
|
||||
for (i = 0; i < (ridSz - ridKeyIdentifierOffset); i++)
|
||||
{
|
||||
size_t j;
|
||||
@@ -18363,6 +18366,7 @@ static int test_wc_PKCS7_GetEnvelopedDataKariRid(void)
|
||||
}
|
||||
ExpectIntEQ(ridKeyIdByte, skiByte);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif /* HAVE_PKCS7 */
|
||||
return EXPECT_RESULT();
|
||||
|
Reference in New Issue
Block a user