check if ctx and ssl are null when checking public key in certificate

This commit is contained in:
Ruby Martin
2025-12-09 17:04:05 -07:00
parent c9fbad2bc3
commit 36e66eb763

View File

@@ -1607,6 +1607,9 @@ static int ProcessBufferCertPublicKey(WOLFSSL_CTX* ctx, WOLFSSL* ssl,
#ifndef NO_RSA #ifndef NO_RSA
word32 idx; word32 idx;
#endif #endif
if (ctx == NULL && ssl == NULL) {
return BAD_FUNC_ARG;
}
/* Get key size and check unless not verifying. */ /* Get key size and check unless not verifying. */
switch (cert->keyOID) { switch (cert->keyOID) {