From 077b070132f2abcd7f70c9e0805206bb77c5bbb8 Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Wed, 23 Oct 2024 17:57:14 -0600 Subject: [PATCH] CID 426427 remove duplicate null checks --- src/x509_str.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/x509_str.c b/src/x509_str.c index a659a73d4..e31097828 100644 --- a/src/x509_str.c +++ b/src/x509_str.c @@ -264,7 +264,7 @@ static int X509StoreVerifyCert(WOLFSSL_X509_STORE_CTX* ctx) WOLFSSL_FILETYPE_ASN1); SetupStoreCtxError(ctx, ret); #if defined(OPENSSL_ALL) || defined(WOLFSSL_QT) - if (ctx->store && ctx->store->verify_cb) + if (ctx->store->verify_cb) ret = ctx->store->verify_cb(ret >= 0 ? 1 : 0, ctx) == 1 ? 0 : ret; #endif @@ -288,7 +288,7 @@ static int X509StoreVerifyCert(WOLFSSL_X509_STORE_CTX* ctx) } SetupStoreCtxError(ctx, ret); #if defined(OPENSSL_ALL) || defined(WOLFSSL_QT) - if (ctx->store && ctx->store->verify_cb) + if (ctx->store->verify_cb) ret = ctx->store->verify_cb(ret >= 0 ? 1 : 0, ctx) == 1 ? 0 : -1; #endif