Skip to content

Commit 069be20

Browse files
committed
Macro guard parameter null check.
1 parent 9102df3 commit 069be20

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

wolfcrypt/src/asn.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42474,14 +42474,18 @@ int wc_SignCRL_ex(const byte* tbsBuf, int tbsSz, int sType,
4247442474
return BAD_FUNC_ARG;
4247542475
if (rsaKey == NULL && eccKey == NULL)
4247642476
return BAD_FUNC_ARG;
42477+
if (rsaKey != NULL && eccKey != NULL)
42478+
return BAD_FUNC_ARG;
4247742479

4247842480
XMEMSET(certSignCtx, 0, sizeof(*certSignCtx));
4247942481

42482+
#ifndef NO_RSA
4248042483
if (rsaKey != NULL) {
4248142484
heap = rsaKey->heap;
4248242485
}
42486+
#endif
4248342487
#ifdef HAVE_ECC
42484-
else if (eccKey != NULL) {
42488+
if (eccKey != NULL) {
4248542489
heap = eccKey->heap;
4248642490
}
4248742491
#endif

0 commit comments

Comments
 (0)