Skip to content

Commit 6633b52

Browse files
Don't try to build wc_RsaSSL_Sign in asn.c MakeSignature if RSA public or verify only is enabled.
1 parent 8395410 commit 6633b52

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

wolfcrypt/src/asn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31689,7 +31689,7 @@ static int MakeSignature(CertSignCtx* certSignCtx, const byte* buf, word32 sz,
3168931689
certSignCtx->state = CERTSIGN_STATE_DO;
3169031690
ret = -1; /* default to error, reassigned to ALGO_ID_E below. */
3169131691

31692-
#ifndef NO_RSA
31692+
#if !defined(NO_RSA) && !defined(WOLFSSL_RSA_PUBLIC_ONLY) && !defined(WOLFSSL_RSA_VERIFY_ONLY)
3169331693
if (rsaKey) {
3169431694
/* signature */
3169531695
ret = wc_RsaSSL_Sign(certSignCtx->encSig,

0 commit comments

Comments
 (0)