Fix build error when NO_RSA is defined

This commit is contained in:
TakayukiMatsuo
2022-08-22 14:03:19 +09:00
parent 26c61f8e0f
commit 48e7035af8

View File

@ -2569,7 +2569,7 @@ static int GetInteger7Bit(const byte* input, word32* inOutIdx, word32 maxIdx)
return b; return b;
} }
#ifdef WC_RSA_PSS #if defined(WC_RSA_PSS) && !defined(NO_RSA)
/* Get the DER/BER encoding of an ASN.1 INTEGER that has a value of no more than /* Get the DER/BER encoding of an ASN.1 INTEGER that has a value of no more than
* 16 bits. * 16 bits.
* *
@ -2614,7 +2614,7 @@ static int GetInteger16Bit(const byte* input, word32* inOutIdx, word32 maxIdx)
*inOutIdx = idx; *inOutIdx = idx;
return n; return n;
} }
#endif #endif /* WC_RSA_PSS && !NO_RSA */
#endif /* !NO_CERTS */ #endif /* !NO_CERTS */
#endif /* !WOLFSSL_ASN_TEMPLATE */ #endif /* !WOLFSSL_ASN_TEMPLATE */
@ -6514,7 +6514,7 @@ int ToTraditionalInline_ex(const byte* input, word32* inOutIdx, word32 sz,
return ASN_PARSE_E; return ASN_PARSE_E;
idx = idx - 1; /* reset idx after finding tag */ idx = idx - 1; /* reset idx after finding tag */
#ifdef WC_RSA_PSS #if defined(WC_RSA_PSS) && !defined(NO_RSA)
if (*algId == RSAPSSk && tag == (ASN_SEQUENCE | ASN_CONSTRUCTED)) { if (*algId == RSAPSSk && tag == (ASN_SEQUENCE | ASN_CONSTRUCTED)) {
word32 seqIdx = idx; word32 seqIdx = idx;
int seqLen; int seqLen;
@ -6535,7 +6535,7 @@ int ToTraditionalInline_ex(const byte* input, word32* inOutIdx, word32 sz,
/* TODO: store parameters so that usage can be checked. */ /* TODO: store parameters so that usage can be checked. */
idx += seqLen; idx += seqLen;
} }
#endif #endif /* WC_RSA_PSS && !NO_RSA */
if (tag == ASN_OBJECT_ID) { if (tag == ASN_OBJECT_ID) {
if (SkipObjectId(input, &idx, sz) < 0) if (SkipObjectId(input, &idx, sz) < 0)