mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 04:04:39 +02:00
reset content length in PKCS7_VerifySignedData for multiPart OCTET_STRING bundles
This commit is contained in:
@@ -4375,9 +4375,13 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
|
|||||||
ret = ASN_PARSE_E;
|
ret = ASN_PARSE_E;
|
||||||
|
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
/* Use single OCTET_STRING directly. */
|
/* Use single OCTET_STRING directly, or reset length. */
|
||||||
if (localIdx - start + length == (word32)contentLen)
|
if (localIdx - start + length == (word32)contentLen) {
|
||||||
multiPart = 0;
|
multiPart = 0;
|
||||||
|
} else {
|
||||||
|
/* reset length to outer OCTET_STRING (contentLen) */
|
||||||
|
length = contentLen;
|
||||||
|
}
|
||||||
localIdx = start;
|
localIdx = start;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user