Skip to content

Commit 9102df3

Browse files
authored
Merge pull request #9837 from jackctj117/PKCS7-unused-variable
Fix unused variable warning in PKCS7 without WC_RSA_PSS
2 parents 080b46d + e6d4c55 commit 9102df3

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/os-check.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ jobs:
5555
CPPFLAGS=''-DWC_RNG_SEED_CB -DWOLFSSL_NO_GETPID'' ',
5656
# PKCS#7 with RSA-PSS (CMS RSASSA-PSS signers)
5757
'--enable-pkcs7 CPPFLAGS=-DWC_RSA_PSS',
58+
# PKCS#7 without RSA-PSS
59+
'--enable-pkcs7',
5860
'--enable-opensslextra CPPFLAGS=''-DWOLFSSL_NO_CA_NAMES'' ',
5961
'--enable-opensslextra=x509small',
6062
'CPPFLAGS=''-DWOLFSSL_EXTRA'' ',

wolfcrypt/src/pkcs7.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5437,7 +5437,9 @@ static int wc_PKCS7_ParseSignerInfo(wc_PKCS7* pkcs7, byte* in, word32 inSz,
54375437
/* Only parse params when still inside the AlgorithmIdentifier;
54385438
* when optional params are absent, idx is already past the sequence. */
54395439
else if (algoContentStart + (word32)algoSeqLen > idx) {
5440+
#if defined(WC_RSA_PSS) && !defined(NO_RSA)
54405441
word32 paramsStart = idx;
5442+
#endif
54415443
byte paramTag;
54425444
int paramLen = 0;
54435445
if (GetASNTag(in, &idx, &paramTag, inSz) != 0 ||

0 commit comments

Comments
 (0)