Shorten some wc_PKCS7_DecodeEncryptedKeyPackage() comment lines to less than 80 characters

This commit is contained in:
Josh Holtrop
2025-07-10 08:10:59 -04:00
parent 3f65846e67
commit 6d51b73626

View File

@@ -14878,7 +14878,8 @@ int wc_PKCS7_SetDecodeEncryptedCtx(wc_PKCS7* pkcs7, void* ctx)
#endif /* NO_PKCS7_ENCRYPTED_DATA */
/* Unwrap and decrypt PKCS#7/CMS EncryptedKeyPackage object, return decoded size. */
/* Unwrap and decrypt PKCS#7/CMS EncryptedKeyPackage object, return the
* decoded size. */
WOLFSSL_API int wc_PKCS7_DecodeEncryptedKeyPackage(wc_PKCS7 * pkcs7,
byte * pkiMsg, word32 pkiMsgSz, byte * output, word32 outputSz)
{
@@ -14893,7 +14894,8 @@ WOLFSSL_API int wc_PKCS7_DecodeEncryptedKeyPackage(wc_PKCS7 * pkcs7,
break;
}
/* Expect a SEQUENCE header to start the EncryptedKeyPackage ContentInfo. */
/* Expect a SEQUENCE header to start the EncryptedKeyPackage
* ContentInfo. */
if (GetSequence_ex(pkiMsg, &pkiIndex, &length, pkiMsgSz, 1) < 0) {
ret = ASN_PARSE_E;
break;
@@ -14918,18 +14920,20 @@ WOLFSSL_API int wc_PKCS7_DecodeEncryptedKeyPackage(wc_PKCS7 * pkcs7,
break;
}
/* Check for EncryptedKeyPackage explicit CHOICE [0] tag, indicating EnvelopedData subtype. */
/* Check for an EncryptedKeyPackage explicit CHOICE [0] tag, indicating
* an EnvelopedData subtype. */
if (GetASNHeader(pkiMsg, ASN_CONTEXT_SPECIFIC | ASN_CONSTRUCTED,
&pkiIndex, &length, pkiMsgSz) >= 0) {
/* Explicit CHOICE [0] tag found. pkiIndex now should point to the
* EnvelopedData ContentInfo object within the EncryptedKeyPackage. */
/* An explicit CHOICE [0] tag was found. pkiIndex now should point
* to the EnvelopedData ContentInfo object within the
* EncryptedKeyPackage. */
ret = wc_PKCS7_DecodeEnvelopedData(pkcs7, &pkiMsg[pkiIndex],
pkiMsgSz - pkiIndex, output, outputSz);
}
else {
#ifndef NO_PKCS7_ENCRYPTED_DATA
/* An explicit CHOICE [0] tag was not found. We do not currently
* support AuthEnvelopedData, so check if we have an EncryptedData blob. */
/* An explicit CHOICE [0] tag was not found. Check if we have an
* EncryptedData blob. */
ret = wc_PKCS7_DecodeEncryptedData(pkcs7, &pkiMsg[pkiIndex],
pkiMsgSz - pkiIndex, output, outputSz);
#else