Skip to content

Commit e6d4c55

Browse files
committed
Move paramsStart declaration inside WC_RSA_PSS guard
1 parent 1f9dd3c commit e6d4c55

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

wolfcrypt/src/pkcs7.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5437,17 +5437,16 @@ 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 ||
54445446
GetLength(in, &idx, &paramLen, inSz) < 0) {
54455447
ret = ASN_PARSE_E;
54465448
}
54475449
else {
5448-
#if !defined(WC_RSA_PSS) || defined(NO_RSA)
5449-
(void)paramsStart;
5450-
#endif
54515450
#if defined(WC_RSA_PSS) && !defined(NO_RSA)
54525451
if ((word32)sigOID == (word32)CTC_RSASSAPSS &&
54535452
paramTag == (ASN_SEQUENCE | ASN_CONSTRUCTED)) {

0 commit comments

Comments
 (0)