From 6633b52e28694a5406350b11a3ac0ec7c2a5e004 Mon Sep 17 00:00:00 2001 From: Kareem Date: Wed, 11 Jun 2025 16:16:49 -0700 Subject: [PATCH] Don't try to build wc_RsaSSL_Sign in asn.c MakeSignature if RSA public or verify only is enabled. --- wolfcrypt/src/asn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index 80b3ce76e..b1c22578b 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -31689,7 +31689,7 @@ static int MakeSignature(CertSignCtx* certSignCtx, const byte* buf, word32 sz, certSignCtx->state = CERTSIGN_STATE_DO; ret = -1; /* default to error, reassigned to ALGO_ID_E below. */ - #ifndef NO_RSA + #if !defined(NO_RSA) && !defined(WOLFSSL_RSA_PUBLIC_ONLY) && !defined(WOLFSSL_RSA_VERIFY_ONLY) if (rsaKey) { /* signature */ ret = wc_RsaSSL_Sign(certSignCtx->encSig,