Skip to content

Commit f939fc3

Browse files
committed
remove dead code in MakeSignature()
1 parent 0c19fb1 commit f939fc3

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

wolfcrypt/src/asn.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32270,21 +32270,21 @@ static int MakeSignature(CertSignCtx* certSignCtx, const byte* buf, word32 sz,
3227032270
signCtx.key = rsaKey;
3227132271
signCtx.keyType = RSA_TYPE;
3227232272
}
32273-
else if (eccKey) {
32273+
else {
3227432274
signCtx.key = eccKey;
3227532275
signCtx.keyType = ECC_TYPE;
3227632276
}
32277-
else {
32278-
ret = BAD_FUNC_ARG;
32279-
goto exit_ms;
32280-
}
3228132277

3228232278
/* Use unified callback path */
3228332279
ret = MakeSignatureCb(certSignCtx, buf, sz, sig, sigSz,
3228432280
(int)sigAlgoType, signCtx.keyType,
3228532281
InternalSignCb, &signCtx, rng, heap);
3228632282
goto exit_ms;
3228732283
}
32284+
else {
32285+
ret = BAD_FUNC_ARG;
32286+
goto exit_ms;
32287+
}
3228832288
#endif
3228932289

3229032290
/* Ed25519, Ed448, and post-quantum algorithms sign messages (not hashes),

0 commit comments

Comments
 (0)