Skip to content

Commit

Permalink
cmp_genm.c: Remove superfluous store_ctx != 0 check
Browse files Browse the repository at this point in the history
This really cannot be ever called with NULL store_ctx
and the check confuses Coverity.

Fixes Coverity 1538865

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from #21755)
  • Loading branch information
t8m committed Aug 18, 2023
1 parent 8b940b6 commit 2b2eedf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/cmp/cmp_genm.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ int OSSL_CMP_get1_caCerts(OSSL_CMP_CTX *ctx, STACK_OF(X509) **out)

static int selfsigned_verify_cb(int ok, X509_STORE_CTX *store_ctx)
{
if (ok == 0 && store_ctx != NULL
if (ok == 0
&& X509_STORE_CTX_get_error_depth(store_ctx) == 0
&& X509_STORE_CTX_get_error(store_ctx)
== X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT) {
Expand Down

0 comments on commit 2b2eedf

Please sign in to comment.