Merge pull request #8109 from JacobBarthelmeh/coverity

Recent coverity warnings
This commit is contained in:
Daniel Pouzzner
2024-10-23 21:18:44 -05:00
committed by GitHub

View File

@ -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
@ -1766,7 +1766,6 @@ WOLF_STACK_OF(WOLFSSL_X509_OBJECT)* wolfSSL_X509_STORE_get0_objects(
}
obj->type = WOLFSSL_X509_LU_X509;
obj->data.x509 = x509;
x509 = NULL;
}
while (wolfSSL_sk_X509_num(cert_stack) > 0) {