wolfcrypt/src/asn.c: tweak retval handling in MakeSignature() CERTSIGN_STATE_DO section for the benefit of WOLFSSL_DEBUG_TRACE_ERROR_CODES.

This commit is contained in:
Daniel Pouzzner
2024-10-22 23:57:56 -05:00
parent 508555c927
commit 3bbd00f918

View File

@ -30198,7 +30198,7 @@ static int MakeSignature(CertSignCtx* certSignCtx, const byte* buf, word32 sz,
case CERTSIGN_STATE_DO:
certSignCtx->state = CERTSIGN_STATE_DO;
ret = ALGO_ID_E; /* default to error */
ret = -1; /* default to error, reassigned to ALGO_ID_E below. */
#ifndef NO_RSA
if (rsaKey) {
@ -30281,6 +30281,9 @@ static int MakeSignature(CertSignCtx* certSignCtx, const byte* buf, word32 sz,
}
#endif /* HAVE_SPHINCS */
if (ret == -1)
ret = ALGO_ID_E;
break;
}