Skip to content

Commit 36e66eb

Browse files
committed
check if ctx and ssl are null when checking public key in certificate
1 parent c9fbad2 commit 36e66eb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ssl_load.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,6 +1607,9 @@ static int ProcessBufferCertPublicKey(WOLFSSL_CTX* ctx, WOLFSSL* ssl,
16071607
#ifndef NO_RSA
16081608
word32 idx;
16091609
#endif
1610+
if (ctx == NULL && ssl == NULL) {
1611+
return BAD_FUNC_ARG;
1612+
}
16101613

16111614
/* Get key size and check unless not verifying. */
16121615
switch (cert->keyOID) {

0 commit comments

Comments
 (0)