Skip to content

Commit

Permalink
wolfcrypt/src/asn.c: tweak retval handling in MakeSignature() CERTSIG…
Browse files Browse the repository at this point in the history
…N_STATE_DO section for the benefit of WOLFSSL_DEBUG_TRACE_ERROR_CODES.
  • Loading branch information
douzzer committed Oct 23, 2024
1 parent 508555c commit 3bbd00f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion wolfcrypt/src/asn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 3bbd00f

Please sign in to comment.