summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2020-02-13 11:00:57 +1000
committerPauli <paul.dale@oracle.com>2020-07-22 20:19:01 +1000
commit41bbba537598522daaf8369778de6d1225a4998e (patch)
treecf4eb63dab871fc339eb4ca325fd30b0019752ca /apps
parent77ae4f6ff7af7d099206a1fc229be7a3ea0e0596 (diff)
EVP: deprecate the EVP_X_meth_ functions.
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11082)
Diffstat (limited to 'apps')
-rw-r--r--apps/genpkey.c4
-rw-r--r--apps/list.c8
2 files changed, 7 insertions, 5 deletions
diff --git a/apps/genpkey.c b/apps/genpkey.c
index 17fb42eba6..389f0e620c 100644
--- a/apps/genpkey.c
+++ b/apps/genpkey.c
@@ -280,7 +280,7 @@ int init_gen_str(EVP_PKEY_CTX **pctx,
ameth = EVP_PKEY_asn1_find_str(&tmpeng, algname, -1);
-#ifndef OPENSSL_NO_ENGINE
+#if !defined(OPENSSL_NO_ENGINE) && !defined(OPENSSL_NO_DEPRECATED_3_0)
if (!ameth && e)
ameth = ENGINE_get_pkey_asn1_meth_str(e, algname, -1);
#endif
@@ -293,7 +293,7 @@ int init_gen_str(EVP_PKEY_CTX **pctx,
ERR_clear_error();
EVP_PKEY_asn1_get0_info(&pkey_id, NULL, NULL, NULL, NULL, ameth);
-#ifndef OPENSSL_NO_ENGINE
+#if !defined(OPENSSL_NO_ENGINE) && !defined(OPENSSL_NO_DEPRECATED_3_0)
ENGINE_finish(tmpeng);
#endif
ctx = EVP_PKEY_CTX_new_id(pkey_id, e);
diff --git a/apps/list.c b/apps/list.c
index f0ea7dc6ae..b58871b1c5 100644
--- a/apps/list.c
+++ b/apps/list.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-/* We need to use some engine deprecated APIs */
+/* We need to use some deprecated APIs */
#define OPENSSL_SUPPRESS_DEPRECATED
#include <string.h>
@@ -509,6 +509,7 @@ static void list_pkey(void)
}
}
+#ifndef OPENSSL_NO_DEPRECATED_3_0
static void list_pkey_meth(void)
{
size_t i;
@@ -524,6 +525,7 @@ static void list_pkey_meth(void)
pkey_flags & ASN1_PKEY_DYNAMIC ? "External" : "Builtin");
}
}
+#endif
#ifndef OPENSSL_NO_DEPRECATED_3_0
static void list_engines(void)
@@ -727,9 +729,9 @@ const OPTIONS list_options[] = {
"List of cipher algorithms"},
{"public-key-algorithms", OPT_PK_ALGORITHMS, '-',
"List of public key algorithms"},
+#ifndef OPENSSL_NO_DEPRECATED_3_0
{"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
@@ -867,9 +869,9 @@ opthelp:
list_ciphers();
if (todo.pk_algorithms)
list_pkey();
+#ifndef OPENSSL_NO_DEPRECATED_3_0
if (todo.pk_method)
list_pkey_meth();
-#ifndef OPENSSL_NO_DEPRECATED_3_0
if (todo.engines)
list_engines();
#endif