]> 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:27:14 +0000 (16:27 +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 249dc75c83acba3ac1f3f8cede5ade0e56e2ea8b..953fefdfb1bf87de88dc74884670d8ff5d4ea969 100644 (file)
@@ -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;