From 6d51b73626437ba3cfd195f7bbf4fab3b29d54fa Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Thu, 10 Jul 2025 08:10:59 -0400 Subject: [PATCH] Shorten some wc_PKCS7_DecodeEncryptedKeyPackage() comment lines to less than 80 characters --- wolfcrypt/src/pkcs7.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/wolfcrypt/src/pkcs7.c b/wolfcrypt/src/pkcs7.c index 66fc41f09..aa94985a7 100644 --- a/wolfcrypt/src/pkcs7.c +++ b/wolfcrypt/src/pkcs7.c @@ -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