pkey: Imply public check if -pubin is specified
authorTomas Mraz <tomas@openssl.org>
Fri, 13 Jan 2023 13:48:52 +0000 (14:48 +0100)
committerTomas Mraz <tomas@openssl.org>
Tue, 17 Jan 2023 11:18:50 +0000 (12:18 +0100)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20044)

apps/pkey.c

index 9e032aa8f44e2926e23f8ac7694e1f3ffdbd70af..f280846fa952f97eb5024841ea3b34109c8521e3 100644 (file)
@@ -248,7 +248,7 @@ int pkey_main(int argc, char **argv)
             goto end;
         }
 
-        if (check)
+        if (check && !pubin)
             r = EVP_PKEY_check(ctx);
         else
             r = EVP_PKEY_public_check(ctx);