Skip to content

Commit 3bbd00f

Browse files
committed
wolfcrypt/src/asn.c: tweak retval handling in MakeSignature() CERTSIGN_STATE_DO section for the benefit of WOLFSSL_DEBUG_TRACE_ERROR_CODES.
1 parent 508555c commit 3bbd00f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

wolfcrypt/src/asn.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30198,7 +30198,7 @@ static int MakeSignature(CertSignCtx* certSignCtx, const byte* buf, word32 sz,
3019830198

3019930199
case CERTSIGN_STATE_DO:
3020030200
certSignCtx->state = CERTSIGN_STATE_DO;
30201-
ret = ALGO_ID_E; /* default to error */
30201+
ret = -1; /* default to error, reassigned to ALGO_ID_E below. */
3020230202

3020330203
#ifndef NO_RSA
3020430204
if (rsaKey) {
@@ -30281,6 +30281,9 @@ static int MakeSignature(CertSignCtx* certSignCtx, const byte* buf, word32 sz,
3028130281
}
3028230282
#endif /* HAVE_SPHINCS */
3028330283

30284+
if (ret == -1)
30285+
ret = ALGO_ID_E;
30286+
3028430287
break;
3028530288
}
3028630289

0 commit comments

Comments
 (0)