From c96cdc99d60d1aa717d023849f97924e54851b3b Mon Sep 17 00:00:00 2001 From: Dmitriy Denisov Date: Tue, 13 May 2025 11:56:33 +0300 Subject: [PATCH] The condition that is never checked has been removed. If criterion == OSSL_STORE_SEARCH_BY_KEY_FINGERPRINT, the criterion !=0 condition will be triggered. Found by Linux Verification Center (linuxtesting.org) with SVACE. Reviewed-by: Tom Cosgrove Reviewed-by: Richard Levitte Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/27607) (cherry picked from commit 00480f1def86aab882f2bd4d15d2d03862009718) --- apps/storeutl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/storeutl.c b/apps/storeutl.c index 249dc75c83a..953fefdfb1b 100644 --- a/apps/storeutl.c +++ b/apps/storeutl.c @@ -200,9 +200,7 @@ int storeutl_main(int argc, char *argv[]) } break; case OPT_CRITERION_FINGERPRINT: - if (criterion != 0 - || (criterion == OSSL_STORE_SEARCH_BY_KEY_FINGERPRINT - && fingerprint != NULL)) { + if (criterion != 0) { BIO_printf(bio_err, "%s: criterion already given.\n", prog); goto end; -- 2.47.2