]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
The condition that is never checked has been removed.
authorDmitriy Denisov <other_ddn@mail.ru>
Tue, 13 May 2025 08:56:33 +0000 (11:56 +0300)
committerTomas Mraz <tomas@openssl.org>
Mon, 19 May 2025 14:26:34 +0000 (16:26 +0200)
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 <tom.cosgrove@arm.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27607)

(cherry picked from commit 00480f1def86aab882f2bd4d15d2d03862009718)

apps/storeutl.c

index b131278a859299d981048536638deee0e742fe93..0f6d91241a759f4f60b28b6f8da7687a1e4b4feb 100644 (file)
@@ -201,9 +201,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;