]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
apps/list: deprecate engine support
authorPauli <paul.dale@oracle.com>
Thu, 25 Jun 2020 00:40:20 +0000 (10:40 +1000)
committerRichard Levitte <levitte@openssl.org>
Thu, 16 Jul 2020 07:12:26 +0000 (09:12 +0200)
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/12226)

apps/list.c
doc/man1/openssl-list.pod.in

index ed93186254d113b88f3be08dde299a50a4b7e9d0..52641e41cb80bb47c0744e8e1244796e80483b40 100644 (file)
@@ -522,9 +522,10 @@ static void list_pkey_meth(void)
     }
 }
 
+#ifndef OPENSSL_NO_DEPRECATED_3_0
 static void list_engines(void)
 {
-#ifndef OPENSSL_NO_ENGINE
+# ifndef OPENSSL_NO_ENGINE
     ENGINE *e;
 
     BIO_puts(bio_out, "Engines:\n");
@@ -533,10 +534,11 @@ static void list_engines(void)
         BIO_printf(bio_out, "%s\n", ENGINE_get_id(e));
         e = ENGINE_get_next(e);
     }
-#else
+# else
     BIO_puts(bio_out, "Engine support is disabled.\n");
-#endif
+# endif
 }
+#endif
 
 static void list_disabled(void)
 {
@@ -592,7 +594,7 @@ static void list_disabled(void)
 #ifdef OPENSSL_NO_EC2M
     BIO_puts(bio_out, "EC2M\n");
 #endif
-#ifdef OPENSSL_NO_ENGINE
+#if defined(OPENSSL_NO_ENGINE) && !defined(OPENSSL_NO_DEPRECATED_3_0)
     BIO_puts(bio_out, "ENGINE\n");
 #endif
 #ifdef OPENSSL_NO_GOST
@@ -689,8 +691,11 @@ typedef enum HELPLIST_CHOICE {
     OPT_ERR = -1, OPT_EOF = 0, OPT_HELP, OPT_ONE, OPT_VERBOSE,
     OPT_COMMANDS, OPT_DIGEST_COMMANDS, OPT_MAC_ALGORITHMS, OPT_OPTIONS,
     OPT_DIGEST_ALGORITHMS, OPT_CIPHER_COMMANDS, OPT_CIPHER_ALGORITHMS,
-    OPT_PK_ALGORITHMS, OPT_PK_METHOD, OPT_ENGINES, OPT_DISABLED,
+    OPT_PK_ALGORITHMS, OPT_PK_METHOD, OPT_DISABLED,
     OPT_KDF_ALGORITHMS, OPT_RANDOM_GENERATORS, OPT_MISSING_HELP, OPT_OBJECTS,
+#ifndef OPENSSL_NO_DEPRECATED_3_0
+    OPT_ENGINES, 
+#endif
     OPT_PROV_ENUM
 } HELPLIST_CHOICE;
 
@@ -721,8 +726,10 @@ const OPTIONS list_options[] = {
      "List of public key algorithms"},
     {"public-key-methods", OPT_PK_METHOD, '-',
      "List of public key methods"},
+#ifndef OPENSSL_NO_DEPRECATED_3_0
     {"engines", OPT_ENGINES, '-',
      "List of loaded engines"},
+#endif
     {"disabled", OPT_DISABLED, '-',
      "List of disabled features"},
     {"missing-help", OPT_MISSING_HELP, '-',
@@ -752,7 +759,9 @@ int list_main(int argc, char **argv)
         unsigned int cipher_algorithms:1;
         unsigned int pk_algorithms:1;
         unsigned int pk_method:1;
+#ifndef OPENSSL_NO_DEPRECATED_3_0
         unsigned int engines:1;
+#endif
         unsigned int disabled:1;
         unsigned int missing_help:1;
         unsigned int objects:1;
@@ -805,9 +814,11 @@ opthelp:
         case OPT_PK_METHOD:
             todo.pk_method = 1;
             break;
+#ifndef OPENSSL_NO_DEPRECATED_3_0
         case OPT_ENGINES:
             todo.engines = 1;
             break;
+#endif
         case OPT_DISABLED:
             todo.disabled = 1;
             break;
@@ -855,8 +866,10 @@ opthelp:
         list_pkey();
     if (todo.pk_method)
         list_pkey_meth();
+#ifndef OPENSSL_NO_DEPRECATED_3_0
     if (todo.engines)
         list_engines();
+#endif
     if (todo.disabled)
         list_disabled();
     if (todo.missing_help)
index 1eb62d3febba9ffefe371bc0dce9b8f06699b432..4cceb2ba0df4f6d81c9c05af3e03edce53459cf0 100644 (file)
@@ -21,7 +21,10 @@ B<openssl list>
 [B<-cipher-algorithms>]
 [B<-public-key-algorithms>]
 [B<-public-key-methods>]
-[B<-engines>]
+
+{- output_off() if $disabled{"deprecated-3.0"}; ""
+-}[B<-engines>]{-
+  output_on() if $disabled{"deprecated-3.0"}; "" -}
 [B<-disabled>]
 [B<-objects>]
 [B<-options> I<command>]
@@ -92,11 +95,15 @@ a block of multiple lines, all but the first are indented.
 =item B<-public-key-methods>
 
 Display a list of public key method OIDs.
-
-=item B<-engines>
-
-Display a list of loaded engines.
-
+{- if (!$disabled{"deprecated-3.0"}) {
+    "\n"
+  . "=item B<-engines>\n"
+  . "\n"
+  . "This option is deprecated.\n"
+  . "\n"
+  . "Display a list of loaded engines.\n"
+  }
+-}
 =item B<-disabled>
 
 Display a list of disabled features, those that were compiled out
@@ -146,6 +153,10 @@ In both cases, C<bar> is the name of the provider.
 
 =back
 
+=head1 HISTORY
+
+The B<-engines> option was deprecated in OpenSSL 3.0.
+
 =head1 COPYRIGHT
 
 Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved.