Don't try to build wc_RsaSSL_Sign in asn.c MakeSignature if RSA public or verify only is enabled.

This commit is contained in:
Kareem
2025-06-11 16:16:49 -07:00
parent 83954100d6
commit 6633b52e28

View File

@@ -31689,7 +31689,7 @@ static int MakeSignature(CertSignCtx* certSignCtx, const byte* buf, word32 sz,
certSignCtx->state = CERTSIGN_STATE_DO; certSignCtx->state = CERTSIGN_STATE_DO;
ret = -1; /* default to error, reassigned to ALGO_ID_E below. */ 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) { if (rsaKey) {
/* signature */ /* signature */
ret = wc_RsaSSL_Sign(certSignCtx->encSig, ret = wc_RsaSSL_Sign(certSignCtx->encSig,