Skip to content

Commit 7af6dec

Browse files
authored
Merge pull request #9856 from anhu/rsa_guard
Macro guard parameter null check.
2 parents f18d5ba + 069be20 commit 7af6dec

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
@@ -42685,14 +42685,18 @@ int wc_SignCRL_ex(const byte* tbsBuf, int tbsSz, int sType,
4268542685
return BAD_FUNC_ARG;
4268642686
if (rsaKey == NULL && eccKey == NULL)
4268742687
return BAD_FUNC_ARG;
42688+
if (rsaKey != NULL && eccKey != NULL)
42689+
return BAD_FUNC_ARG;
4268842690

4268942691
XMEMSET(certSignCtx, 0, sizeof(*certSignCtx));
4269042692

42693+
#ifndef NO_RSA
4269142694
if (rsaKey != NULL) {
4269242695
heap = rsaKey->heap;
4269342696
}
42697+
#endif
4269442698
#ifdef HAVE_ECC
42695-
else if (eccKey != NULL) {
42699+
if (eccKey != NULL) {
4269642700
heap = eccKey->heap;
4269742701
}
4269842702
#endif

0 commit comments

Comments
 (0)