first addition of verify sign stream data

This commit is contained in:
Jacob Barthelmeh
2018-10-18 10:48:05 -06:00
committed by David Garske
parent 47303ed445
commit 5525f59852
4 changed files with 706 additions and 419 deletions
+671 -415
View File
File diff suppressed because it is too large Load Diff
+14
View File
@@ -21411,6 +21411,20 @@ static int pkcs7signed_run_SingleShotVectors(
wc_PKCS7_Free(pkcs7);
return -9565;
}
#ifndef NO_PKCS7_STREAM
{
word32 z;
for (z = 0; z < outSz && ret != 0; z++) {
ret = wc_PKCS7_VerifySignedData(pkcs7, out + z, 1);
if (ret < 0 && ret != WC_PKCS7_WANT_READ_E) {
XFREE(out, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
wc_PKCS7_Free(pkcs7);
printf("unexpected error %d\n", ret);
return -9565;
}
}
}
#endif
if (pkcs7->singleCert == NULL || pkcs7->singleCertSz == 0) {
XFREE(out, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);