spelling fixes and return value fix

pull/8520/head
JacobBarthelmeh 2025-02-28 14:34:51 -07:00
parent ea387323c3
commit ea9f044bcc
1 changed files with 5 additions and 7 deletions

View File

@ -12612,7 +12612,7 @@ WOLFSSL_API int wc_PKCS7_DecodeEnvelopedData(wc_PKCS7* pkcs7, byte* in,
if (explicitOctet) { if (explicitOctet) {
/* encrypted content may be fragmented into multiple /* encrypted content may be fragmented into multiple
* consecutive OCTET STRINGs, if so loop through * consecutive OCTET STRINGs, if so loop through
* decrypting and outputing or caching contents until the indef * decrypting and outputting or caching contents until the indef
* ending tag is found */ * ending tag is found */
if (pkcs7->decryptionCb == NULL) { if (pkcs7->decryptionCb == NULL) {
@ -12735,7 +12735,7 @@ WOLFSSL_API int wc_PKCS7_DecodeEnvelopedData(wc_PKCS7* pkcs7, byte* in,
} }
else { else {
//@TODO copy over into output buffer, we need an //@TODO copy over into output buffer, we need an
// index/ofset into the buffer // index/offset into the buffer
} }
} }
@ -13528,7 +13528,7 @@ WOLFSSL_API int wc_PKCS7_DecodeAuthEnvelopedData(wc_PKCS7* pkcs7, byte* in,
ret = ASN_PARSE_E; ret = ASN_PARSE_E;
} }
/* check that the expected size was acurate */ /* check that the expected size was accurate */
if (ret == 0) { if (ret == 0) {
if (length > (int)pkcs7->stream->expected && length > (int)pkiMsgSz) { if (length > (int)pkcs7->stream->expected && length > (int)pkiMsgSz) {
pkcs7->stream->expected = length + 1; pkcs7->stream->expected = length + 1;
@ -13780,10 +13780,8 @@ WOLFSSL_API int wc_PKCS7_DecodeAuthEnvelopedData(wc_PKCS7* pkcs7, byte* in,
/* From RFC5083, "For the purpose of constructing the AAD, the /* From RFC5083, "For the purpose of constructing the AAD, the
* IMPLICIT [1] tag in the authAttrs field is not used for the * IMPLICIT [1] tag in the authAttrs field is not used for the
* DER encoding: rather a universal SET OF tag is used. */ * DER encoding: rather a universal SET OF tag is used. */
if (SetSet(length, pkcs7->stream->aad) < 0) { (void)SetSet(length, pkcs7->stream->aad); /* ignoring the size returned,
ret = ASN_PARSE_E; * we know it is idx - encodedAttribIdx from parsing whats given */
break;
}
} }
} }