adjust next PKCS#7 envelopedData recipient check

This commit is contained in:
Chris Conlon
2014-01-20 11:42:45 -07:00
parent c4eb5642b1
commit ce7fe56de5

View File

@@ -962,23 +962,16 @@ CYASSL_API int PKCS7_DecodeEnvelopedData(PKCS7* pkcs7, byte* pkiMsg,
* indicate there is another, if not, move on */ * indicate there is another, if not, move on */
while(recipFound == 0) { while(recipFound == 0) {
/* remove RecipientInfo */ /* remove RecipientInfo, if we don't have a SEQUENCE, back up idx to
* last good saved one */
if (GetSequence(pkiMsg, &idx, &length, pkiMsgSz) < 0) { if (GetSequence(pkiMsg, &idx, &length, pkiMsgSz) < 0) {
if (recipFound == 0) { idx = savedIdx;
return ASN_PARSE_E; break;
} else {
idx = savedIdx;
break;
}
} }
if (GetMyVersion(pkiMsg, &idx, &version) < 0) { if (GetMyVersion(pkiMsg, &idx, &version) < 0) {
if (recipFound == 0) { idx = savedIdx;
return ASN_PARSE_E; break;
} else {
idx = savedIdx;
break;
}
} }
if (version != 0) if (version != 0)