From 48e7035af8a602705f5a075bf6d278c6d3e8c804 Mon Sep 17 00:00:00 2001 From: TakayukiMatsuo Date: Mon, 22 Aug 2022 14:03:19 +0900 Subject: [PATCH] Fix build error when NO_RSA is defined --- wolfcrypt/src/asn.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index cf0ed0433..0a8b32923 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -2569,7 +2569,7 @@ static int GetInteger7Bit(const byte* input, word32* inOutIdx, word32 maxIdx) 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 * 16 bits. * @@ -2614,7 +2614,7 @@ static int GetInteger16Bit(const byte* input, word32* inOutIdx, word32 maxIdx) *inOutIdx = idx; return n; } -#endif +#endif /* WC_RSA_PSS && !NO_RSA */ #endif /* !NO_CERTS */ #endif /* !WOLFSSL_ASN_TEMPLATE */ @@ -6514,7 +6514,7 @@ int ToTraditionalInline_ex(const byte* input, word32* inOutIdx, word32 sz, return ASN_PARSE_E; 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)) { word32 seqIdx = idx; 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. */ idx += seqLen; } -#endif +#endif /* WC_RSA_PSS && !NO_RSA */ if (tag == ASN_OBJECT_ID) { if (SkipObjectId(input, &idx, sz) < 0)